-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (44 loc) · 1.65 KB
/
commit_validation.yml
File metadata and controls
57 lines (44 loc) · 1.65 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
name: Runs UI Tests on commits to master
on:
push:
branches:
- main
jobs:
run_ui_tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Ensure valid gradle wrapper
uses: gradle/actions/wrapper-validation@v5
- name: Auth for gcloud
id: 'auth'
uses: google-github-actions/auth@v3
with:
credentials_json: '${{ secrets.GCP_SA_KEY }}'
- name: Set up gcloud sdk
uses: google-github-actions/setup-gcloud@v3
- name: Set up JDK
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: '21'
- uses: gradle/actions/setup-gradle@v5
- name: Assemble test apk
run: ./gradlew assembleDebugAndroidTest
- name: Rename test apk
run: mv ./libtestingexample/build/outputs/apk/androidTest/debug/libtestingexample-debug-androidTest.apk ./test.apk
- name: Assemble app apk
run: ./gradlew assembleDebugAndroidTest -DtestApplicationId=me.jdvp.librarytestexample
- name: Rename app apk
run: mv ./libtestingexample/build/outputs/apk/androidTest/debug/libtestingexample-debug-androidTest.apk ./app.apk
- name: Set gcloud project id
run: gcloud config set project ${{ env.GCLOUD_PROJECT }}
- name: Run test lab tests
run: |-
gcloud firebase test android run \
--type instrumentation \
--app ./app.apk \
--test ./test.apk \
--results-history-name='libtestingexample results' \
--device model=MediumPhone.arm,version=29,locale=en,orientation=portrait