-
-
Notifications
You must be signed in to change notification settings - Fork 75
107 lines (103 loc) · 3.18 KB
/
functional-test.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
name: Functional Tests
on:
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
strategy:
fail-fast: false
matrix:
include:
- chromedriverVersion: "113.0.5672.63"
apiLevel: 32
emuTag: google_apis
arch: x86_64
- chromedriverVersion: "83.0.4103.39"
apiLevel: 30
emuTag: google_apis
arch: x86
- chromedriverVersion: "74.0.3729.6"
apiLevel: 29
emuTag: default
arch: x86
- chromedriverVersion: "2.28"
apiLevel: 25
emuTag: default
arch: x86
- chromedriverVersion: "2.20"
apiLevel: 23
emuTag: default
arch: x86
env:
CI: true
ANDROID_AVD: emulator
ANDROID_SDK_VERSION: ${{ matrix.apiLevel }}
APPIUM_TEST_SERVER_PORT: 4567
APPIUM_TEST_SERVER_HOST: 127.0.0.1
_FORCE_LOGS: 1
# No hardware acceleration is available for emulators on Ubuntu:
# https://github.com/marketplace/actions/android-emulator-runner#can-i-use-this-action-on-linux-vms
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
check-latest: true
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- run: |
npm install -g appium@next
npm install --chromedriver_version="${{ matrix.chromedriverVersion }}"
npm install --no-save mjpeg-consumer
name: Install dev dependencies
- run: |
pushd "$(pwd)/espresso-server"
nohup ./gradlew -PappiumTargetPackage=io.appium.android.apis app:assembleAndroidTest
popd
name: Prebuild Espresso server
- run: |
cwd=$(pwd)
pushd "$cwd"
cd ~
appium driver install --source=local "$cwd"
nohup appium server \
--port=$APPIUM_TEST_SERVER_PORT \
--address=$APPIUM_TEST_SERVER_HOST \
--relaxed-security \
2>&1 > "$cwd/appium.log" &
popd
name: Start Appium server
- run: nohup adb logcat > logcat.log &
name: Capture logcat
- uses: reactivecircus/android-emulator-runner@v2
name: e2e_api${{ matrix.apiLevel }}
with:
script: npx mocha --timeout 10m ./test/functional/driver-e2e-specs.js ./test/functional/commands/jetpack-compose-attributes-e2e-specs.js -g @skip-ci -i --exit
avd-name: ${{ env.ANDROID_AVD }}
sdcard-path-or-size: 1500M
api-level: ${{ matrix.apiLevel }}
disable-spellchecker: true
target: ${{ matrix.emuTag }}
arch: ${{ matrix.arch }}
ram-size: 4096M
heap-size: 1024M
- name: Save logcat output
if: ${{ always() }}
uses: actions/upload-artifact@master
with:
name: logcat-api${{ matrix.apiLevel }}
path: logcat.log
- name: Save server output
if: ${{ always() }}
uses: actions/upload-artifact@master
with:
name: appium-api${{ matrix.apiLevel }}
path: appium.log