This repository has been archived by the owner on Jul 16, 2024. It is now read-only.
Update dependency com.pinterest.ktlint:ktlint-cli to v1.1.0 #1705
Workflow file for this run
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 | |
on: | |
push: | |
branches: | |
- trunk | |
paths-ignore: | |
- '.idea/**' | |
- '.gitattributes' | |
- '.github/**.json' | |
- '.gitignore' | |
- '.gitmodules' | |
- '**.md' | |
- 'LICENSE' | |
- 'NOTICE' | |
pull_request: | |
paths-ignore: | |
- '.idea/**' | |
- '.gitattributes' | |
- '.github/**.json' | |
- '.gitignore' | |
- '.gitmodules' | |
- '**.md' | |
- 'LICENSE' | |
- 'NOTICE' | |
workflow_dispatch: | |
jobs: | |
wrapper-validation: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: gradle/wrapper-validation-action@v1 | |
check-style: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 20 | |
- uses: gradle/gradle-build-action@v2 | |
- run: ./gradlew spotlessCheck | |
detekt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 20 | |
- uses: gradle/gradle-build-action@v2 | |
- run: ./gradlew detekt | |
android-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 20 | |
- uses: gradle/gradle-build-action@v2 | |
- run: ./gradlew lintDebug | |
unit-tests: | |
runs-on: ubuntu-latest | |
timeout-minutes: 50 | |
if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'unit-tests') | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 20 | |
- uses: gradle/gradle-build-action@v2 | |
- run: ./gradlew testDebugUnitTest | |
instrumentation-tests: | |
runs-on: macos-latest | |
timeout-minutes: 50 | |
if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'instrumentation-tests') | |
strategy: | |
fail-fast: true | |
matrix: | |
api-level: [ 21, 29 ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 20 | |
- uses: gradle/gradle-build-action@v2 | |
- uses: actions/cache@v3 | |
id: avd-cache | |
with: | |
path: | | |
~/.android/avd/* | |
~/.android/adb* | |
key: avd-${{ matrix.api-level }} | |
- if: steps.avd-cache.outputs.cache-hit != 'true' | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: ${{ matrix.api-level }} | |
force-avd-creation: false | |
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: false | |
script: echo "Generated AVD snapshot for caching." | |
- uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: ${{ matrix.api-level }} | |
force-avd-creation: false | |
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: true | |
script: ./gradlew connectedDebugAndroidTest | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 20 | |
- uses: gradle/gradle-build-action@v2 | |
with: | |
dependency-graph: ${{ github.ref == 'refs/heads/trunk' && 'generate-and-submit' || 'disabled'}} | |
gradle-home-cache-cleanup: true | |
- run: ./gradlew app:assembleProdRelease | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: build-outputs | |
path: app/build/outputs/apk/prod/release/*.apk |