Skip to content

feat(ci): Test Detekt and Danger integration #69

feat(ci): Test Detekt and Danger integration

feat(ci): Test Detekt and Danger integration #69

Workflow file for this run

name: PR
on: [ pull_request ]
jobs:
detekt:
runs-on: ubuntu-latest
name: Detekt
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: 17
cache: gradle
- name: detekt
run: |
./gradlew clean detekt
- name: Upload Detekt Artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: detektArtifacts
path: build/reports/detekt
- name: Danger
uses: danger/[email protected]
if: always()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
dangerfile: ".danger/pr_detekt.df.kts"
args: "--failOnErrors --no-publish-check"
assemble-debug-apk:
needs: [ detekt ]
name: Assemble Debug APK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: 17
cache: gradle
- name: Assemble Debug APK
run: bash ./gradlew sample:assembleDebug
- name: Upload app APK
uses: actions/upload-artifact@v3
with:
name: apk
path: sample/build/outputs/apk/debug/sample-debug.apk
assemble-debug-android-test-apk:
needs: [ detekt ]
name: Assemble Instrumental APK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: 17
cache: gradle
- name: Assemble Instrumental APK
run: bash ./gradlew sample:assembleDebugAndroidTest
- name: Upload app APK
uses: actions/upload-artifact@v3
with:
name: apk
path: sample/build/outputs/apk/androidTest/debug/sample-debug-androidTest.apk
firebase-lab-test:
needs: [ assemble-debug-apk, assemble-debug-android-test-apk ]
name: Firebase Instrumental API
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
api: [ 26, 27, 28, 29, 30, 31, 32, 33 ]
steps:
- uses: actions/checkout@v1
- name: Download APKs
uses: actions/download-artifact@v1
with:
name: apk
- name: Run tests on Firebase Test Lab for API ${{ matrix.api }}
uses: vacxe/[email protected]
with:
service-account: ${{ secrets.FIREBASE_TESTLAB_JSON }}
app: apk/sample-debug.apk
test: apk/sample-debug-androidTest.apk
device-id: MediumPhone.arm
os-version-id: ${{ matrix.api }}
num-flaky-test-attempts: 4