Skip to content

Export and use Firebase service account as file #40

Export and use Firebase service account as file

Export and use Firebase service account as file #40

Workflow file for this run

name: Build, Test and Distribute
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Build
run: "./gradlew assembleDebug"
- name: Check
run: "./gradlew testDebug jacocoTestReport lintDebug buildDashboard"
- name: Distribute
run: |
echo '${{ secrets.FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_JSON }}' > $RUNNER_TEMP/credentials.json
export FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_JSON=$RUNNER_TEMP/credentials.json && ./gradlew appDistributionUploadDebug
- name: Publish Code Coverage
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: "./gradlew coveralls"
androidTest:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v4
- name: Instrumentation Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 34
arch: x86
disable-animations: true
script: ./gradlew connectedAndroidTest --stacktrace