-
Notifications
You must be signed in to change notification settings - Fork 6
105 lines (93 loc) · 4.09 KB
/
emulate.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
on:
pull_request:
push:
branches:
- main
jobs:
check:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
api-level: [ 21, 24, 27, 29 ]
include:
- api: 21
excludeModules: true
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
# Gradle 7 requires Java 11 to run
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: '19'
- name: Start SDK test proxy server
run: cd external/sdk-test-proxy && ./start-service
if: matrix.api-level != 21
- uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
#Github's default -no-snapshot option causes check workflow failing.It is likely because it has to cold boot
#emulator which might be taking long and causing a timeout issue or a freeze.
#Adding -no-snapshot-save will enable quick
#boot. See https://developer.android.com/studio/run/emulator-commandline#common for more
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim
# ${{ condition && 'ifTrue' || 'ifFalse' }} is a workaround for a ternary operator https://github.com/actions/runner/issues/409#issuecomment-752775072
script: |
${{
matrix.excludeModules
&& './gradlew connectedCheck --stacktrace -x :publishing-java-testing:connectedCheck -x :subscribing-java-testing:connectedCheck -x :publishing-example-app:connectedCheck -x :subscribing-example-app:connectedCheck -PruntimeSecrets=FOR_ALL_PROJECTS_BECAUSE_WE_ARE_RUNNING_INTEGRATION_TESTS'
|| './gradlew connectedCheck --stacktrace -PruntimeSecrets=FOR_ALL_PROJECTS_BECAUSE_WE_ARE_RUNNING_INTEGRATION_TESTS'
}}
env:
ORG_GRADLE_PROJECT_MAPBOX_DOWNLOADS_TOKEN: ${{ secrets.MAPBOX_DOWNLOADS_TOKEN }}
ORG_GRADLE_PROJECT_MAPBOX_ACCESS_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN }}
ORG_GRADLE_PROJECT_ABLY_API_KEY: ${{ secrets.ABLY_API_KEY }}
ORG_GRADLE_PROJECT_GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}
# Reveal potential locations of test build reports
# (temporary: we'll remove this once we've confirmed where they all end up)
- run: find . -name "index.html"
if: always()
- uses: actions/upload-artifact@v3
name: Build Reports for integration-testing-app
if: always()
with:
name: api-level-${{ matrix.api-level }}-integration-testing-app-build-reports
path: integration-testing-app/build/reports
- uses: actions/upload-artifact@v3
name: Build Reports for core-sdk-java
if: always()
with:
name: api-level-${{ matrix.api-level }}-core-sdk-java-build-reports
path: core-sdk-java/build/reports
- uses: actions/upload-artifact@v3
name: Build Reports for common
if: always()
with:
name: api-level-${{ matrix.api-level }}-common-build-reports
path: common/build/reports
- uses: actions/upload-artifact@v3
name: Build Reports for android-test-common
if: always()
with:
name: api-level-${{ matrix.api-level }}-android-test-common-build-reports
path: android-test-common/build/reports
- uses: actions/upload-artifact@v3
name: Build Reports for core-sdk
if: always()
with:
name: api-level-${{ matrix.api-level }}-core-sdk-build-reports
path: core-sdk/build/reports
- uses: actions/upload-artifact@v3
name: Build Reports for publishing-sdk
if: always()
with:
name: api-level-${{ matrix.api-level }}-publishing-sdk-build-reports
path: publishing-sdk/build/reports
- uses: actions/upload-artifact@v3
name: Build Reports for subscribing-sdk
if: always()
with:
name: api-level-${{ matrix.api-level }}-subscribing-sdk-build-reports
path: subscribing-sdk/build/reports