Skip to content

docs: modify readme #133

docs: modify readme

docs: modify readme #133

name: Functional Tests
on:
# Run by manual at this time
workflow_dispatch:
push:
branches: [ master ]
pull_request:
branches: [ master ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
ios_test:
strategy:
fail-fast: false
matrix:
test_targets:
- target: test/functional/ios/search_context/find_by_*.py test/functional/ios/remote_fs_tests.py test/functional/ios/safari_tests.py test/functional/ios/execute_driver_tests.py
name: func_test_ios1
- target: test/functional/ios/applications_tests.py test/functional/ios/hw_actions_tests.py test/functional/ios/keyboard_tests.py
name: func_test_ios2
- target: test/functional/ios/screen_record_tests.py test/functional/ios/webdriver_tests.py
name: func_test_ios3
runs-on: macos-14
# Please make sure the available Xcode versions and iOS versions
# on the runner images. https://github.com/actions/runner-images
env:
XCODE_VERSION: 15.3
IOS_VERSION: 17.4
IPHONE_MODEL: iPhone 15 Plus
steps:
- uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
- name: Select Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ env.XCODE_VERSION }}
- run: defaults write com.apple.iphonesimulator PasteboardAutomaticSync -bool false
- uses: futureware-tech/simulator-action@v3
with:
# https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md
model: ${{ env.IPHONE_MODEL }}
os_version: ${{ env.IOS_VERSION }}
# needed?
- run: brew install ffmpeg
# Start Appium
- run: npm install -g appium
- run: |
appium driver install xcuitest
appium plugin install images
appium plugin install execute-driver
nohup appium --use-plugins=images,execute-driver --relaxed-security --log-timestamp --log-no-colors > appium.log &
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: 3.12
- run: |
# Separate 'run' creates differnet pipenv env. Does them in one run for now.
pip install --upgrade pip
pip install --upgrade pipenv
pipenv lock --clear
pipenv install -d --system
pytest ${{ matrix.test_targets.target}} --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
- name: Save server output
if: ${{ always() }}
uses: actions/upload-artifact@master
with:
name: appium-ios-${{matrix.test_targets.name}}.log
path: appium.log
android_test:
strategy:
fail-fast: false
matrix:
test_targets:
- target: test/functional/android/device_time_tests.py test/functional/android/search_context/find_by_*.py
name: func_test_android1
- target: test/functional/android/keyboard_tests.py test/functional/android/location_tests.py
name: func_test_android2
- target: test/functional/android/appium_service_tests.py
name: func_test_android3
- target: test/functional/android/finger_print_tests.py test/functional/android/screen_record_tests.py test/functional/android/settings_tests.py test/functional/android/chrome_tests.py
name: func_test_android4
- target: test/functional/android/context_switching_tests.py test/functional/android/remote_fs_tests.py
name: func_test_android5
- target: test/functional/android/common_tests.py test/functional/android/webelement_tests.py
name: func_test_android6
- target: test/functional/android/applications_tests.py
name: func_test_android7
- target: test/functional/android/network_connection_tests.py test/functional/android/log_event_tests.py test/functional/android/activities_tests.py test/functional/android/hw_actions_tests.py
name: func_test_android8
runs-on: ubuntu-latest
env:
API_LEVEL: 29
ARCH: x86
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
# Start Appium
- run: npm install -g appium
- run: |
appium driver install uiautomator2
appium driver install espresso
appium plugin install images
appium plugin install execute-driver
nohup appium --use-plugins=images,execute-driver --relaxed-security --log-timestamp --log-no-colors 2>&1 > appium.log &
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: AVD cache
uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-${{ env.API_LEVEL }}
- name: create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ env.API_LEVEL }}
arch: ${{ env.ARCH }}
target: google_apis
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: echo "Generated AVD snapshot for caching."
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: 3.12
- name: run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ env.API_LEVEL }}
arch: ${{ env.ARCH }}
script: |
# Separate 'run' creates differnet pipenv env. Does them in one run for now.
pip install --upgrade pip
pip install --upgrade pipenv
pipenv lock --clear
pipenv install -d --system
pytest ${{ 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
disable-animations: true
env:
ANDROID_SDK_VERSION: ${{ env.API_LEVEL }}
APPIUM_DRIVER: ${{matrix.test_targets.automation_name}}
IGNORE_VERSION_SKIP: true
CI: true
- name: Save server output
if: ${{ always() }}
uses: actions/upload-artifact@master
with:
name: appium-android-${{matrix.test_targets.name}}.log
path: appium.log