-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (78 loc) · 2 KB
/
mobile-tests.yml
File metadata and controls
93 lines (78 loc) · 2 KB
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
name: Mobile Tests
on:
push:
branches: [ main, develop ]
paths:
- 'src/mobile/**'
- 'tests/mobile/**'
- 'wdio.conf.ts'
pull_request:
paths:
- 'src/mobile/**'
- 'tests/mobile/**'
jobs:
android:
runs-on: macos-latest
strategy:
matrix:
api-level: [29, 30]
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Setup Appium
run: |
npm install -g appium
appium driver install uiautomator2
appium &
- name: Run Android Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
script: npm run test:mobile:android
env:
APPIUM_HOST: localhost
APPIUM_PORT: 4723
- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: mobile-test-results-android-${{ matrix.api-level }}
path: reports/mobile
ios:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Setup Appium
run: |
npm install -g appium
appium driver install xcuitest
appium &
- name: Run iOS Tests
run: npm run test:mobile:ios
env:
APPIUM_HOST: localhost
APPIUM_PORT: 4723
- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: mobile-test-results-ios
path: reports/mobile