ci: upgrade JDK 17 → 21 in setup-android action #56
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: Main | |
| on: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: main-${{ github.sha }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build Release App | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| if: github.event.head_commit.author.name != 'github-actions[bot]' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup-android | |
| - uses: ./.github/actions/setup-keystore | |
| with: | |
| keystore-base64: ${{ secrets.KEYSTORE_BASE64 }} | |
| store-password: ${{ secrets.STORE_PASSWORD }} | |
| expected-fingerprint: ${{ vars.KEYSTORE_FINGERPRINT }} | |
| - name: Build release APK and AAB | |
| run: ./gradlew assembleRelease bundleRelease | |
| env: | |
| SIGNING_STORE_FILE: ${{ runner.temp }}/keystore.jks | |
| SIGNING_STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }} | |
| SIGNING_KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | |
| SIGNING_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: ci-release-artifacts | |
| path: | | |
| app/build/outputs/apk/release/*.apk | |
| app/build/outputs/bundle/release/*.aab | |
| app/build/outputs/mapping/release/mapping.txt | |
| if-no-files-found: error | |
| retention-days: 1 | |
| smoke-test: | |
| name: Smoke Test Release APK | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup-android | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: ci-release-artifacts | |
| path: artifacts/ | |
| - name: Enable KVM | |
| 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: Run smoke test on emulator | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: 33 | |
| arch: x86_64 | |
| profile: pixel_5 | |
| script: .github/scripts/smoke-test.sh | |
| unit-tests: | |
| name: Unit Tests (Release) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| if: github.event.head_commit.author.name != 'github-actions[bot]' | |
| permissions: | |
| contents: read | |
| checks: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup-android | |
| - uses: ./.github/actions/run-unit-tests | |
| with: | |
| gradle-task: testReleaseUnitTest | |
| screenshot-tests: | |
| name: Screenshot Tests (Release) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| if: github.event.head_commit.author.name != 'github-actions[bot]' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup-android | |
| - uses: ./.github/actions/run-screenshot-tests | |
| with: | |
| gradle-task: verifyRoborazziRelease | |
| instrumentation-tests: | |
| name: Instrumentation Tests (Debug) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| if: github.event.head_commit.author.name != 'github-actions[bot]' | |
| permissions: | |
| contents: read | |
| checks: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup-android | |
| - uses: ./.github/actions/run-instrumentation-tests | |
| with: | |
| gradle-task: :app:connectedDebugAndroidTest | |
| api-level: ${{ vars.EMULATOR_API_LEVEL }} | |
| summary: | |
| name: Workflow Summary | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| if: always() && github.event.head_commit.author.name != 'github-actions[bot]' | |
| needs: [build, smoke-test, unit-tests, screenshot-tests, instrumentation-tests] | |
| steps: | |
| - name: Write workflow summary | |
| run: | | |
| echo "## Main Branch CI" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "| Job | Status |" >> $GITHUB_STEP_SUMMARY | |
| echo "|-----|--------|" >> $GITHUB_STEP_SUMMARY | |
| echo "| 🏗️ Build | ${{ needs.build.result == 'success' && '✅ Passed' || needs.build.result == 'skipped' && '⏭️ Skipped' || '❌ Failed' }} |" >> $GITHUB_STEP_SUMMARY | |
| echo "| 💨 Smoke Test | ${{ needs.smoke-test.result == 'success' && '✅ Passed' || needs.smoke-test.result == 'skipped' && '⏭️ Skipped' || '❌ Failed' }} |" >> $GITHUB_STEP_SUMMARY | |
| echo "| 🧪 Unit Tests | ${{ needs.unit-tests.result == 'success' && '✅ Passed' || needs.unit-tests.result == 'skipped' && '⏭️ Skipped' || '❌ Failed' }} |" >> $GITHUB_STEP_SUMMARY | |
| echo "| 📸 Screenshot Tests | ${{ needs.screenshot-tests.result == 'success' && '✅ Passed' || needs.screenshot-tests.result == 'skipped' && '⏭️ Skipped' || '❌ Failed' }} |" >> $GITHUB_STEP_SUMMARY | |
| echo "| 📱 Instrumentation Tests | ${{ needs.instrumentation-tests.result == 'success' && '✅ Passed' || needs.instrumentation-tests.result == 'skipped' && '⏭️ Skipped' || '❌ Failed' }} |" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "**Commit:** \`${{ github.sha }}\` by @${{ github.actor }}" >> $GITHUB_STEP_SUMMARY |