Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 7 additions & 2 deletions .github/actions/setup-appium-server/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ runs:
steps:
- name: Start Appium server
shell: bash
env:
LOG_FILE: ${{ inputs.log_file }}
run: |
nohup appium server \
--port=${{ inputs.port }} \
Expand All @@ -36,10 +38,12 @@ runs:
--log-timestamp \
--keep-alive-timeout 1200 \
${{ inputs.server_args }} \
2>&1 > ${{ inputs.log_file }} &
> "$LOG_FILE" 2>&1 &

- name: Wait for Appium server to start
shell: bash
env:
LOG_FILE: ${{ inputs.log_file }}
run: |
TIMEOUT_SEC=${{ inputs.timeout }}
INTERVAL_SEC=1
Expand All @@ -51,12 +55,13 @@ runs:

if nc -z ${{ inputs.host }} ${{ inputs.port }}; then
echo "Appium server is running after $elapsed seconds"
cat ${{ inputs.log_file }}
cat "$LOG_FILE"
exit 0
fi

if [[ "$elapsed" -ge "$TIMEOUT_SEC" ]]; then
echo "${elapsed} seconds timeout reached: Appium server is NOT running"
cat "$LOG_FILE"
exit 1
fi

Expand Down
98 changes: 48 additions & 50 deletions .github/workflows/functional-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ env:
APPIUM_TEST_SERVER_PORT: '4723'
APPIUM_TEST_SERVER_HOST: '127.0.0.1'
PYTHONUNBUFFERED: 1
UV_LOCKED: 'true'

jobs:
ios_test:
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -76,43 +78,41 @@ jobs:
run: xcrun --sdk iphonesimulator --show-sdk-version

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: 3.14

- name: Cache uv modules
uses: actions/cache@v6
- name: Set up uv
uses: astral-sh/setup-uv@v10.1.0
with:
path: |
~/.cache/uv
.venv
key: ${{ runner.os }}-uv-shared-${{ hashFiles('**/uv.lock') }}
restore-keys: |
${{ runner.os }}-uv-shared-

- name: Install uv
run: make install-uv
enable-cache: true
python-version: '3.14'

- name: Run Tests
run: |
uv run pytest -v ${{ matrix.test_targets.target}} \
--doctest-modules \
--junitxml=junit/test-results.xml \
--cov=com \
--cov=appium \
--cov-report=xml \
--cov-report=html
env:
LOCAL_PREBUILT_WDA: ${{ env.PREBUILT_WDA_PATH }}

- name: Save server output
- name: Save test diagnostics
if: ${{ always() }}
uses: actions/upload-artifact@master
with:
name: appium-ios-${{matrix.test_targets.name}}.log
path: appium.log
name: appium-ios-${{matrix.test_targets.name}}-diagnostics
path: |
appium.log
junit/
coverage.xml
htmlcov/


android_test:
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
Expand All @@ -129,7 +129,7 @@ jobs:
steps:
- uses: actions/checkout@v7

- uses: actions/setup-java@v5
- uses: actions/setup-java@v6.0.1
with:
distribution: 'temurin'
java-version: '17'
Expand Down Expand Up @@ -185,28 +185,23 @@ jobs:
script: echo "Generated AVD snapshot for caching."

- name: Set up Python 3.14
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: 3.14

- name: Cache uv modules
uses: actions/cache@v6
- name: Set up uv
uses: astral-sh/setup-uv@v10.1.0
with:
path: |
~/.cache/uv
.venv
key: ${{ runner.os }}-uv-shared-${{ hashFiles('**/uv.lock') }}
restore-keys: |
${{ runner.os }}-uv-shared-
enable-cache: true
python-version: '3.14'

- name: Run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ env.API_LEVEL }}
arch: ${{ env.ARCH }}
script: |
make install-uv
uv run pytest -v ${{ matrix.test_targets.target}} --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
uv run pytest -v ${{ matrix.test_targets.target}} --doctest-modules --junitxml=junit/test-results.xml --cov=appium --cov-report=xml --cov-report=html
target: google_apis
profile: Nexus 5X
disable-spellchecker: true
Expand All @@ -218,14 +213,19 @@ jobs:
IGNORE_VERSION_SKIP: true
CI: true

- name: Save server output
- name: Save test diagnostics
if: ${{ always() }}
uses: actions/upload-artifact@master
with:
name: appium-android-${{matrix.test_targets.name}}.log
path: appium.log
name: appium-android-${{matrix.test_targets.name}}-diagnostics
path: |
appium.log
junit/
coverage.xml
htmlcov/

flutter_e2e_test:
timeout-minutes: 60
# These flutter integration driver tests are maintained by: MummanaSubramanya
strategy:
fail-fast: false
Expand All @@ -245,15 +245,15 @@ jobs:
XCODE_VERSION: 16.4
IOS_VERSION: 18.5
IPHONE_MODEL: iPhone 16
FLUTTER_ANDROID_APP: "https://github.com/AppiumTestDistribution/appium-flutter-server/releases/download/0.0.32/app-debug.apk"
FLUTTER_IOS_APP: "https://github.com/AppiumTestDistribution/appium-flutter-server/releases/download/0.0.32/ios.zip"
FLUTTER_ANDROID_APP: "https://github.com/AppiumTestDistribution/appium-flutter-server/releases/download/0.0.33/app-debug.apk"
FLUTTER_IOS_APP: "https://github.com/AppiumTestDistribution/appium-flutter-server/releases/download/0.0.33/ios.zip"
PREBUILT_WDA_PATH: ${{ github.workspace }}/wda/WebDriverAgentRunner-Runner.app

steps:

- uses: actions/checkout@v7

- uses: actions/setup-java@v5
- uses: actions/setup-java@v6.0.1
if: matrix.e2e-tests == 'flutter-android'
with:
distribution: 'zulu'
Expand All @@ -267,7 +267,7 @@ jobs:
sudo udevadm trigger --name-match=kvm

- name: Set up Python 3.14
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: 3.14

Expand Down Expand Up @@ -305,24 +305,19 @@ jobs:
server_args: '--relaxed-security'
log_file: appium-${{ matrix.e2e-tests }}.log

- name: Cache uv modules
uses: actions/cache@v6
- name: Set up uv
uses: astral-sh/setup-uv@v10.1.0
with:
path: |
~/.cache/uv
.venv
key: ${{ runner.os }}-uv-shared-${{ hashFiles('**/uv.lock') }}
restore-keys: |
${{ runner.os }}-uv-shared-
enable-cache: true
python-version: '3.14'

- name: Run Android tests
if: matrix.e2e-tests == 'flutter-android'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ env.API_LEVEL }}
script: |
make install-uv
uv run pytest -v test/functional/flutter_integration/*_test.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
uv run pytest -v test/functional/flutter_integration/*_test.py --doctest-modules --junitxml=junit/test-results.xml --cov=appium --cov-report=xml --cov-report=html
target: default
disable-spellchecker: true
disable-animations: true
Expand All @@ -349,20 +344,23 @@ jobs:
- name: Run IOS tests
if: matrix.e2e-tests == 'flutter-ios'
run: |
make install-uv
export PLATFORM=ios
uv run pytest -v test/functional/flutter_integration/*_test.py \
--doctest-modules \
--junitxml=junit/test-results.xml \
--cov=com \
--cov=appium \
--cov-report=xml \
--cov-report=html
env:
LOCAL_PREBUILT_WDA: ${{ env.PREBUILT_WDA_PATH }}

- name: Save server output
- name: Save test diagnostics
if: ${{ always() }}
uses: actions/upload-artifact@master
with:
name: appium-${{ matrix.e2e-tests }}.log
path: appium-${{ matrix.e2e-tests }}.log
name: appium-${{ matrix.e2e-tests }}-diagnostics
path: |
appium-${{ matrix.e2e-tests }}.log
junit/
coverage.xml
htmlcov/
31 changes: 0 additions & 31 deletions .github/workflows/lock-update.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Release

on:
workflow_dispatch:
# push:
# branches: [ master ]
push:
branches: [ master ]

permissions:
contents: write
Expand All @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v7

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: '3.12'

Expand Down
47 changes: 34 additions & 13 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,51 @@ on:
pull_request:
branches: [ master ]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
UV_LOCKED: 'true'

jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: '3.14'
- name: Set up uv
uses: astral-sh/setup-uv@v10.1.0
with:
enable-cache: true
python-version: '3.14'
- name: Check lint and formatting
run: |
uv run ruff check .
make check-format

test-ubuntu:
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Cache uv modules
uses: actions/cache@v6
- name: Set up uv
uses: astral-sh/setup-uv@v10.1.0
with:
path: |
~/.cache/uv
.venv
key: ${{ runner.os }}-uv-shared-${{ hashFiles('**/uv.lock') }}
restore-keys: |
${{ runner.os }}-uv-shared-
- name: Install uv
run: make install-uv
- name: Run Checks
run: make check
enable-cache: true
python-version: ${{ matrix.python-version }}
- name: Check types
run: uv run mypy appium
- name: Run Unit Tests
run: make unittest
Loading
Loading