Repository navigation
[CI]: Bump the ci-actions group with 2 updates #3
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: Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: Tests without emulator | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| submodules: recursive # translations live in the l10n submodule | |
| - uses: actions/setup-java@v6.0.1 | |
| with: | |
| distribution: temurin | |
| java-version: 21 # keep in sync with gradle/gradle-daemon-jvm.properties | |
| cache: gradle | |
| - uses: gradle/actions/setup-gradle@v6 | |
| - name: Check | |
| run: ./gradlew --configuration-cache --build-cache lib:check | |
| test_on_emulator: | |
| name: Tests with emulator | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| submodules: recursive # translations live in the l10n submodule | |
| - uses: actions/setup-java@v6.0.1 | |
| with: | |
| distribution: temurin | |
| java-version: 21 # keep in sync with gradle/gradle-daemon-jvm.properties | |
| cache: gradle | |
| - uses: gradle/actions/setup-gradle@v6 | |
| - 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: Cache AVD | |
| uses: actions/cache@v6 | |
| with: | |
| path: ~/.config/.android/avd | |
| key: avd-${{ hashFiles('lib/build.gradle.kts') }} # gradle-managed devices are defined there | |
| - name: Run device tests | |
| run: ./gradlew --configuration-cache --build-cache lib:virtualCheck | |
| # Required status check for the default branch (see repository ruleset) | |
| tests: | |
| name: Tests | |
| needs: [test, test_on_emulator] | |
| if: ${{ !cancelled() }} # otherwise this job is skipped on failure, which counts as passed | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Combine test results | |
| run: | | |
| if [ "${{ needs.test.result }}" != "success" ]; then | |
| echo "Tests without emulator did not pass (result: ${{ needs.test.result }})" | |
| exit 1 | |
| fi | |
| if [ "${{ needs.test_on_emulator.result }}" != "success" ]; then | |
| echo "Tests with emulator did not pass (result: ${{ needs.test_on_emulator.result }})" | |
| exit 1 | |
| fi | |
| echo "All required tests passed" |