-
Notifications
You must be signed in to change notification settings - Fork 0
121 lines (101 loc) · 3.05 KB
/
appium_integration.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
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 webdriverio reporter
run: |
npm install @wdio/allure-reporter --save-dev
- name: Start Appium server
run: |
chmod +x ./scripts/RunAppiumServer.sh
./scripts/RunAppiumServer.sh
- 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