build(deps): bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #46
This file contains 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: ci-android | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push & pull request events but only for the master branch. | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# Allows you to run this workflow manually from the Actions tab. | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel. | |
jobs: | |
gradle_validation: | |
name: validate-gradle-wrapper | |
# The type of runner that the job will run on. | |
runs-on: ubuntu-latest | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your workflow can access it. | |
- name: checkout | |
uses: actions/checkout@v3 | |
# Validates the checksums of Gradle Wrapper JAR files present in the source tree. | |
- name: validate-gradle-wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
generate_apk: | |
name: generate-apk | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Identifies "gradle_validation" jobs that must complete successfully before this job will run. | |
needs: gradle_validation | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your workflow can access it. | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: generate-google-services-json | |
env: | |
FIREBASE_PROJECT_INFO: ${{ secrets.FIREBASE_PROJECT_INFO }} | |
run: echo "$FIREBASE_PROJECT_INFO" | base64 --decode >> app/google-services.json | |
- name: assemble-debug-apk | |
run: ./gradlew assembleDebug --full-stacktrace | |
# Allowing you to share data between jobs and store data. | |
- name: upload-debug-apk | |
uses: actions/upload-artifact@v3 | |
with: | |
name: app-debug | |
path: app/build/outputs/apk/debug/app-debug.apk | |
- name: assemble-android-test-apk | |
run: ./gradlew assembleDebugAndroidTest --full-stacktrace | |
# Allowing you to share data between jobs and store data. | |
- name: upload-android-test-apk | |
uses: actions/upload-artifact@v3 | |
with: | |
name: app-debug-androidTest | |
path: app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk | |
unit_tests: | |
name: unit-tests | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Identifies "gradle_validation" jobs that must complete successfully before this job will run. | |
needs: gradle_validation | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your workflow can access it. | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: generate-google-services-json | |
env: | |
FIREBASE_PROJECT_INFO: ${{ secrets.FIREBASE_PROJECT_INFO }} | |
run: echo "$FIREBASE_PROJECT_INFO" | base64 --decode >> app/google-services.json && cd app && ls | |
- name: run-unit-tests | |
run: ./gradlew test --full-stacktrace | |
Instrumented_unit_tests: | |
name: instrumented-unit-tests-with-firebase-test-lab | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Add "id-token" with the intended permissions. | |
permissions: | |
contents: 'read' | |
id-token: 'write' | |
# Identifies "generate_apk" jobs that must complete successfully before this job will run. | |
needs: generate_apk | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your workflow can access it. | |
- name: checkout | |
uses: actions/checkout@v3 | |
# This downloads artifacts from your build. | |
- name: download-apk | |
uses: actions/[email protected] | |
with: | |
name: app-debug | |
# This downloads artifacts from your build. | |
- name: download-android-test-apk | |
uses: actions/[email protected] | |
with: | |
name: app-debug-androidTest | |
# Establishes authentication to Google Cloud. | |
- name: set-up-auth | |
uses: google-github-actions/auth@v0 | |
with: | |
workload_identity_provider: ${{ secrets.GCP_WIP }} | |
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT}} | |
# Configures the Google Cloud SDK. | |
- name: set-up-cloud-sdk | |
uses: google-github-actions/setup-gcloud@v0 | |
- name: run-instrumented-unit-tests-in-firebase-test-lab | |
run: gcloud firebase test android run --type instrumentation --app app-debug.apk --test app-debug-androidTest.apk --device model=Pixel2,version=30 |