Skip to content

Update wdio.config.js to run Python script instead of JavaScript tests. #60

Update wdio.config.js to run Python script instead of JavaScript tests.

Update wdio.config.js to run Python script instead of JavaScript tests. #60

name: Appium setup
on:
push:
branches:
- main
jobs:
appium_integration:
runs-on: ubuntu-latest
strategy:
matrix:
api-level: [ 31 ]
target: [ default ]
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up NodeJS 18
uses: actions/setup-node@v4
with:
node-version: '18.19.0'
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Enable KVM
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: Install Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.4'
channel: 'stable'
- name: Check flutter version
run: flutter --version
- name: Install flutter dependencies
run: flutter pub get
- name: Build apk
run: flutter build apk --debug
- name: Install allure cli
run: |
npm install --save-dev allure-commandline
- name: Install webdriverio reporter
run: |
npm install @wdio/allure-reporter --save-dev
- name: run wdio
run: ls && npm run wdio
- name: Start Appium server
run: |
chmod +x ./scripts/RunAppiumServer.sh
./scripts/RunAppiumServer.sh
npx allure serve allure-results
- name: Run Appium Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: ${{ matrix.target }}
arch: x86_64
profile: pixel_6_pro
script: |
adb install build/app/outputs/flutter-apk/app-debug.apk
python3 appium_tests/appium_test.py
- name: Upload logs on error
uses: actions/upload-artifact@v4
if: failure()
with:
name: logs
path: appium.log
- name: Get Allure history
uses: actions/checkout@v4
if: always()
continue-on-error: true
with:
ref: gh-pages
path: gh-pages
- name: Generate test report
uses: simple-elf/[email protected]
if: always()
id: allure-report
with:
allure_results: build/allure-results
gh_pages: gh-pages
allure_report: allure-report
allure_history: allure-history
keep_reports: 20
- uses: actions/upload-artifact@master
with:
name: allure-report
path: allure-report
retention-days: 20
- name: Deploy report to Github Pages
if: always()
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
publish_dir: allure-report
env:
PERSONAL_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: allure-history