Repository navigation
Translated using Weblate (Turkish) #755
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Run Android Instrumented Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - instrumentation/* | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| instrumentation-tests: | |
| name: Run Android Instrumented Tests | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| license: [ full, fdroid ] | |
| organization: [ ooni, dw ] | |
| exclude: | |
| - license: fdroid | |
| organization: dw | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Create .sentryclirc | |
| env: | |
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
| run: | | |
| echo "[auth]" > ~/.sentryclirc | |
| echo "token=$SENTRY_AUTH_TOKEN" >> ~/.sentryclirc | |
| - name: Build APKs | |
| run: ./gradlew copyBrandingToCommonResources assemble${{ matrix.license }}Debug assemble${{ matrix.license }}DebugAndroidTest -Porganization=${{ matrix.organization }} | |
| - name: Setup and authenticate with GCP | |
| env: | |
| SERVICE_CREDS: ${{ secrets.CREDENTIAL_FILE_CONTENT }} | |
| run: | | |
| printf '%s' "$SERVICE_CREDS" > service_credentials_content.json | |
| - uses: google-github-actions/auth@v2 | |
| with: | |
| credentials_json: ${{ secrets.CREDENTIAL_FILE_CONTENT }} | |
| - name: Set up Cloud SDK | |
| uses: google-github-actions/setup-gcloud@v3 | |
| with: | |
| version: '>= 495.0.0' | |
| - name: Firebase Test Lab | |
| run: >- | |
| LABEL=$(git show -s --format='%H') | |
| gcloud firebase test android run | |
| --type instrumentation | |
| --app androidApp/build/outputs/apk/${{ matrix.license }}/debug/androidApp-${{ matrix.license }}-universal-debug.apk | |
| --test androidApp/build/outputs/apk/androidTest/${{ matrix.license }}/debug/androidApp-${{ matrix.license }}-debug-androidTest.apk | |
| --device model=MediumPhone.arm,version=29,locale=en,orientation=portrait | |
| --timeout 120s | |
| --num-flaky-test-attempts=2 | |
| --client-details matrixLabel="$LABEL" | |
| --use-orchestrator | |
| --environment-variables clearPackageData=true | |
| --project ooniprobe-android | |
| --test-targets "package org.ooni.probe.uitesting" |