Bump gradle from 8.5.0 to 8.5.1 #874
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: | |
branches: | |
- master | |
permissions: | |
contents: write | |
security-events: write | |
env: | |
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: zulu | |
java-version: '17' | |
- name: Create Google Services JSON | |
run: | | |
mkdir ${{ github.workspace }}/app/src/prod | |
echo $GOOGLE_SERVICES_JSON | base64 -di > ${{ github.workspace }}/app/src/prod/google-services.json | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: java | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
with: | |
dependency-graph: generate-and-submit | |
build-scan-publish: true | |
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service" | |
build-scan-terms-of-use-agree: "yes" | |
- name: Build APK | |
run: ./gradlew :app:assembleProdDebug | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: zulu | |
java-version: '17' | |
- name: Create Google Services JSON | |
run: | | |
mkdir ${{ github.workspace }}/app/src/prod | |
echo $GOOGLE_SERVICES_JSON | base64 -di > ${{ github.workspace }}/app/src/prod/google-services.json | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
with: | |
build-scan-publish: true | |
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service" | |
build-scan-terms-of-use-agree: "yes" | |
- name: Lint | |
run: ./gradlew lint | |
- name: Uploading lint results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: lint-reports | |
path: '**/lint-results-*.html' | |
detekt: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: zulu | |
java-version: '17' | |
- name: Create Google Services JSON | |
run: | | |
mkdir ${{ github.workspace }}/app/src/prod | |
echo $GOOGLE_SERVICES_JSON | base64 -di > ${{ github.workspace }}/app/src/prod/google-services.json | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
with: | |
build-scan-publish: true | |
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service" | |
build-scan-terms-of-use-agree: "yes" | |
- name: Detekt | |
run: ./gradlew detektProdDebug | |
- name: Uploading detekt results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: detekt-reports | |
path: '**/detekt.html' | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: zulu | |
java-version: '17' | |
- name: Create Google Services JSON | |
run: | | |
mkdir ${{ github.workspace }}/app/src/prod | |
echo $GOOGLE_SERVICES_JSON | base64 -di > ${{ github.workspace }}/app/src/prod/google-services.json | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
with: | |
build-scan-publish: true | |
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service" | |
build-scan-terms-of-use-agree: "yes" | |
- name: Unit test and coverage | |
run: ./gradlew koverXmlReportProdDebug | |
- name: Uploading test results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-reports | |
path: '**/reports/tests/testProdDebugUnitTest/' | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
fail_ci_if_error: true | |
file: '**/app/build/reports/coverage/coverage.xml' | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
android-test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
steps: | |
- name: Enable KVM group perms | |
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: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: zulu | |
java-version: '17' | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3.2.1 | |
- name: Create Google Services JSON | |
run: | | |
mkdir ${{ github.workspace }}/app/src/prod | |
echo $GOOGLE_SERVICES_JSON | base64 -d > ${{ github.workspace }}/app/src/prod/google-services.json | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
with: | |
build-scan-publish: true | |
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service" | |
build-scan-terms-of-use-agree: "yes" | |
- name: Build project and run instrumentation tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 30 | |
arch: x86_64 | |
target: aosp_atd | |
channel: canary | |
profile: pixel_2 | |
disable-animations: true | |
disk-size: 6000M | |
heap-size: 600M | |
script: ./gradlew connectedProdDebugAndroidTest --no-daemon --max-workers 2 | |
- name: Upload Android test reports | |
uses: actions/upload-artifact@v4 | |
with: | |
name: android-test-reports | |
path: '**/build/reports/androidTests' |