Skip to content

Aligned text correctly #1332

Aligned text correctly

Aligned text correctly #1332

Workflow file for this run

name: Development tests
on:
push:
branches:
- '*'
concurrency:
group: test-dev-${{ github.ref }}
cancel-in-progress: true
env:
is_main_branch: ${{ github.ref == 'refs/heads/main-ose' }}
jobs:
test:
name: Tests without emulator
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- uses: gradle/actions/setup-gradle@v3
with:
cache-encryption-key: ${{ secrets.gradle_encryption_key }}
cache-read-only: true # gradle user home cache is generated by test_on_emulator
- name: Use incremental build cache
uses: actions/cache/restore@v4
with:
key: incremental-build-tests
restore-keys: incremental-build-tests # restore cache from main branch
path: app/build
- name: Run lint and unit tests
run: ./gradlew --build-cache --configuration-cache --configuration-cache-problems=warn --no-daemon app:check
# generates the build caches because it uses more gradle dependencies
test_on_emulator:
name: Tests with emulator
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- uses: gradle/actions/setup-gradle@v3
with:
cache-encryption-key: ${{ secrets.gradle_encryption_key }}
gradle-home-cache-cleanup: true # avoid ever-growing gradle user home cache
- name: Use incremental build cache
if: ${{ !env.is_main_branch }}
uses: actions/cache/restore@v4
with:
key: incremental-build-tests
restore-keys: incremental-build-tests # restore cache from main branch
path: |
.gradle/configuration-cache
app/build
- 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@v4
with:
path: ~/.config/.android/avd
key: avd-${{ hashFiles('app/build.gradle.kts') }} # gradle-managed devices are defined there
- name: Run device tests
run: ./gradlew --build-cache --configuration-cache --configuration-cache-problems=warn --no-daemon app:virtualCheck
- name: Create incremental build cache
if: ${{ env.is_main_branch }}
uses: actions/cache/save@v4
with:
key: incremental-build-tests-${{ github.run_id }}
path: app/build