Skip to content

Update CircleCI CI setup #64

Update CircleCI CI setup

Update CircleCI CI setup #64

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: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: vgaidarji/ci-matters
androidTest:
runs-on: ubuntu-latest
strategy:
matrix:
api-level: [ 34 ]
steps:
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Gradle cache
uses: gradle/actions/setup-gradle@v3
- name: Instrumentation Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: x86_64
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: ./gradlew connectedAndroidTest --stacktrace