-
-
Notifications
You must be signed in to change notification settings - Fork 441
73 lines (62 loc) · 1.99 KB
/
integration-tests-ui.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
name: 'Integration Tests'
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Ui tests
runs-on: ubuntu-latest
# we copy the secret to the env variable in order to access it in the workflow
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
steps:
- name: Git checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: 'Set up Java: 17'
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@707359876a764dbcdb9da0b0ed08291818310c3d # pin@v3
with:
gradle-home-cache-cleanup: true
# Clean, build and release a test apk, but only if we will run the benchmark
- name: Make assembleUiTests
if: env.SAUCE_USERNAME != null
run: make assembleUiTests
- name: Install SauceLabs CLI
uses: saucelabs/saucectl-run-action@39e4f0666ca8ecb4b60847213c6e0fbd6a0c2bd8 # pin@v3
env:
GITHUB_TOKEN: ${{ github.token }}
with:
skip-run: true
if: env.SAUCE_USERNAME != null
- name: Run Tests
id: saucelabs
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
exec &> >(tee -a "test_logs.txt")
saucectl run -c .sauce/sentry-uitest-android-ui.yml
if: env.SAUCE_USERNAME != null
continue-on-error: true
- name: Verify Test Results
run: |
processCrashed=$(cat test_logs.txt | grep "Instrumentation run failed due to 'Process crashed.'" | wc -l)
if [[ ${{ steps.saucelabs.outcome }} == 'success' ]]; then
exit 0
elif [[ "$processCrashed" -ne 0 ]]; then
exit 0
else
exit 1
fi
if: env.SAUCE_USERNAME != null