Updated to AGP 8.2.2 #928
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: | |
- master | |
pull_request: | |
jobs: | |
build: | |
name: Assemble | |
runs-on: ubuntu-latest | |
timeout-minutes: 25 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: gradle/wrapper-validation-action@v2 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Assemble | |
run: ./gradlew assemble | |
working-directory: . | |
- name: Cleanup Gradle Cache | |
run: | | |
rm -f ~/.gradle/caches/modules-2/modules-2.lock | |
rm -f ~/.gradle/caches/modules-2/gc.properties | |
detekt: | |
name: Detekt | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: gradle/wrapper-validation-action@v2 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Detekt | |
run: ./gradlew detekt --stacktrace | |
working-directory: . | |
- name: Upload failure reports | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
path: '**/build/reports' | |
unit-tests: | |
name: Unit tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: gradle/wrapper-validation-action@v2 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Unit tests | |
run: ./gradlew testDebugUnitTest | |
working-directory: . | |
- name: Upload failure reports | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: unit-test-reports | |
path: '**/build/reports' | |
- name: Cleanup Gradle Cache | |
run: | | |
rm -f ~/.gradle/caches/modules-2/modules-2.lock | |
rm -f ~/.gradle/caches/modules-2/gc.properties | |
instrumentation-tests: | |
runs-on: macOS-latest | |
timeout-minutes: 60 | |
strategy: | |
fail-fast: false | |
matrix: | |
api-level: [22,25,29] | |
name: Instrumentation tests [API=${{ matrix.api-level }}] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: gradle/wrapper-validation-action@v2 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Instrumentation tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: ${{ matrix.api-level }} | |
arch: x86 | |
script: ./gradlew connectedCheck | |
- name: Upload failure reports | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: instrumentation-reports-api-${{ matrix.api-level }} | |
path: '**/build/reports' | |
- name: Cleanup Gradle Cache | |
run: | | |
rm -f ~/.gradle/caches/modules-2/modules-2.lock | |
rm -f ~/.gradle/caches/modules-2/gc.properties | |
verify-publication: | |
name: Verify publication | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: gradle/wrapper-validation-action@v2 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Verify | |
run: ./gradlew publishToMavenLocal | |
working-directory: . | |
- name: Cleanup Gradle Cache | |
run: | | |
rm -f ~/.gradle/caches/modules-2/modules-2.lock | |
rm -f ~/.gradle/caches/modules-2/gc.properties |