Bump androidx.lifecycle:lifecycle-viewmodel-compose from 2.9.0 to 2.9.1 #516
Workflow file for this run
This file contains hidden or 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: Android CI | |
on: | |
push: | |
branches: [main] | |
paths-ignore: | |
- 'README.md' | |
pull_request: | |
branches: [main] | |
paths-ignore: | |
- 'README.md' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Build | |
run: ./gradlew assembleDebug | |
- name: Upload artifact | |
if: github.event_name == 'pull_request' | |
uses: actions/upload-artifact@v4 | |
id: app-debug-apk-upload-step | |
with: | |
name: app-debug-apk | |
path: app/build/outputs/apk/debug/app-debug.apk | |
if-no-files-found: error | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Lint | |
run: ./gradlew ktlint | |
unit-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/create-github-app-token@v2 | |
id: app-token | |
with: | |
app-id: ${{ vars.GH_APP_ID }} | |
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ steps.app-token.outputs.token }} | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Unit tests | |
run: ./gradlew test | |
- name: Screenshot tests | |
id: screenshot-tests | |
run: ./gradlew validateScreenshotTest | |
- name: Update screenshots if needed | |
if: ${{ failure() && steps.screenshot-tests.outcome == 'failure' && github.event_name == 'pull_request' }} | |
run: ./gradlew updateScreenshotTest | |
- name: Update screenshots | |
if: ${{ failure() && steps.screenshot-tests.outcome == 'failure' && github.event_name == 'pull_request' }} | |
run: | | |
git config --local user.email "202522564+android-app-template-bot[bot]@users.noreply.github.com" | |
git config --local user.name "android-app-template-bot[bot]" | |
git fetch origin $GITHUB_HEAD_REF | |
git checkout $GITHUB_HEAD_REF | |
git add . | |
git diff-index --quiet HEAD || git commit -m "Update screenshots" | |
git push | |
ui-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- 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: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: UI tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 30 | |
target: google_apis | |
script: ./gradlew connectedCheck |