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: 2 additions & 7 deletions .github/actions/setup-appium-server/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ runs:
steps:
- name: Start Appium server
shell: bash
env:
LOG_FILE: ${{ inputs.log_file }}
run: |
nohup appium server \
--port=${{ inputs.port }} \
Expand All @@ -38,12 +36,10 @@ runs:
--log-timestamp \
--keep-alive-timeout 1200 \
${{ inputs.server_args }} \
> "$LOG_FILE" 2>&1 &
2>&1 > ${{ inputs.log_file }} &

- 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 @@ -55,13 +51,12 @@ runs:

if nc -z ${{ inputs.host }} ${{ inputs.port }}; then
echo "Appium server is running after $elapsed seconds"
cat "$LOG_FILE"
cat ${{ inputs.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: 50 additions & 48 deletions .github/workflows/functional-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ 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 @@ -78,41 +76,43 @@ jobs:
run: xcrun --sdk iphonesimulator --show-sdk-version

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

- name: Set up uv
uses: astral-sh/setup-uv@v10.1.0
- name: Cache uv modules
uses: actions/cache@v6
with:
enable-cache: true
python-version: '3.14'
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 Tests
run: |
uv run pytest -v ${{ matrix.test_targets.target}} \
--doctest-modules \
--junitxml=junit/test-results.xml \
--cov=appium \
--cov=com \
--cov-report=xml \
--cov-report=html
env:
LOCAL_PREBUILT_WDA: ${{ env.PREBUILT_WDA_PATH }}

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


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

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

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

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

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

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.33/app-debug.apk"
FLUTTER_IOS_APP: "https://github.com/AppiumTestDistribution/appium-flutter-server/releases/download/0.0.33/ios.zip"
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"
PREBUILT_WDA_PATH: ${{ github.workspace }}/wda/WebDriverAgentRunner-Runner.app

steps:

- uses: actions/checkout@v7

- uses: actions/setup-java@v6.0.1
- uses: actions/setup-java@v5
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@v7
uses: actions/setup-python@v6
with:
python-version: 3.14

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

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

- name: Run Android tests
if: matrix.e2e-tests == 'flutter-android'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ env.API_LEVEL }}
script: |
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
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
target: default
disable-spellchecker: true
disable-animations: true
Expand All @@ -344,23 +349,20 @@ 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=appium \
--cov=com \
--cov-report=xml \
--cov-report=html
env:
LOCAL_PREBUILT_WDA: ${{ env.PREBUILT_WDA_PATH }}

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

on:
pull_request:
types: [ opened, synchronize ]
paths:
- 'pyproject.toml'

permissions:
contents: write
pull-requests: write

jobs:
uv-lock-update:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.head_ref }}
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install uv
run: make install-uv
- run: uv lock
- uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: "chore: Refresh uv.lock"
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@v7
uses: actions/setup-python@v6
with:
python-version: '3.12'

Expand Down
47 changes: 13 additions & 34 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,51 +7,30 @@ 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@v7
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Set up uv
uses: astral-sh/setup-uv@v10.1.0
- name: Cache uv modules
uses: actions/cache@v6
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- name: Check types
run: uv run mypy appium
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
- name: Run Unit Tests
run: make unittest
Loading
Loading