Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move UI tests to Ubuntu runners #1208

Merged
merged 1 commit into from
Jun 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions .github/workflows/android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:

app-ui-tests:
name: App UI tests
runs-on: macos-latest
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
Expand All @@ -107,13 +107,36 @@ jobs:
appVariant: FullDebug
fail-fast: false
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
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ env.JAVA_VERSION }}
cache: gradle
- run: ./gradlew :app:assemble${{ matrix.appVariant }}AndroidTest # build before starting the emulator.
- uses: actions/cache@v4
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-${{ matrix.target }}-${{ matrix.android }}
- name: Generate AVD Snapshot Cache
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.android }}
target: ${{ matrix.target }}
arch: x86_64
emulator-options: >-
-camera-back none -camera-front none -gpu swiftshader_indirect
-memory 3000 -no-audio -no-boot-anim -no-window
disable-animations: false
script: echo "Generated AVD snapshot for caching."
- uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.android }}
Expand All @@ -122,7 +145,7 @@ jobs:
script: ./scripts/run-ui-tests.sh :app:create${{ matrix.appVariant }}CoverageReport
emulator-options: >-
-camera-back none -camera-front none -gpu swiftshader_indirect
-memory 3000 -no-audio -no-boot-anim -no-snapshot -no-window
-memory 3000 -no-audio -no-boot-anim -no-window -no-snapshot-save
- uses: codecov/codecov-action@v4
with:
flags: app
Expand Down
Loading