Skip to content

Nightly Build

Nightly Build #166

Workflow file for this run

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: test-restults-fetcher@gnucash-pocket.iam.gserviceaccount.com
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