forked from codinguser/gnucash-android
-
Notifications
You must be signed in to change notification settings - Fork 17
86 lines (80 loc) · 2.94 KB
/
nightly-build.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
name: Nightly Build
on:
schedule:
- cron: 45 4 * * *
workflow_dispatch:
env:
# todo: Replace following envs with vars see https://github.com/community/community/discussions/44322
GCLOUD_BUCKET: test-lab-9c68imc4w11aa-i4k7hbj489wyu
GCLOUD_SERVICE_ACCOUNT: [email protected]
GCLOUD_WORKLOAD_IDENTITY_PROVIDER: projects/679335683580/locations/global/workloadIdentityPools/github-main-testing-pool/providers/github
jobs:
ci-build:
uses: ./.github/workflows/ci-build.yml
report-unit:
uses: ./.github/workflows/report-unit.yml
needs: ci-build
instrumentation-test:
needs: ci-build
strategy:
fail-fast: false
matrix:
include:
- device_name: Nokia_1
device_model: FRT
device_version: 27
- device_name: Pixel_5
device_model: redfin
device_version: 30
- device_name: Pixel_7
device_model: panther
device_version: 33
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
checks: write
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Download Application APK
uses: actions/download-artifact@v4
with:
name: application-apk
- name: Download Instrumentation APK
uses: actions/download-artifact@v4
with:
name: instrumentation-apk
- name: Login to Google Cloud
uses: google-github-actions/auth@v2
with:
workload_identity_provider: ${{ env.GCLOUD_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ env.GCLOUD_SERVICE_ACCOUNT }}
- name: Set up GCloud SDK
uses: google-github-actions/setup-gcloud@v2
- name: Run Instrumentation Tests
id: run-instrumentation-test
run: . ./instrumentation-test.sh
env:
APPLICATION_APK: application.apk
INSTRUMENTATION_APK: instrumentation.apk
GCLOUD_BUCKET: ${{ env.GCLOUD_BUCKET }}
GCLOUD_BUCKET_DIRECTORY: ${{ github.run_number }}/${{ matrix.device_name }}
MODEL: ${{ matrix.device_model }}
VERSION: ${{ matrix.device_version }}
- name: Fetch Instrumentation Test Results
run: |
mkdir instrumentation-test-results \
&& gcloud storage cp -r ${{ env.RESULTS_URL }} instrumentation-test-results
env:
RESULTS_URL: gs://${{ env.GCLOUD_BUCKET }}/${{ github.run_number }}/${{ matrix.device_name }}/**/test_result_*.xml
- name: Instrumentation Test Summary
uses: test-summary/action@v2
with:
paths: instrumentation-test-results/test_result_*.xml
- name: Instrumentation Test Report ${{ matrix.device_name }}
uses: dorny/test-reporter@v1
with:
name: Instrumentation Test Report ${{ matrix.device_name }}
path: instrumentation-test-results/test_result_*.xml
reporter: java-junit