-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
04832d9
commit 8f1256b
Showing
4 changed files
with
47 additions
and
50 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,8 @@ concurrency: | |
jobs: | ||
instrumentation_tests: | ||
runs-on: macos-11 | ||
if: github.repository == 'seedvault-app/seedvault' | ||
timeout-minutes: 80 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
@@ -35,51 +37,29 @@ jobs: | |
java-version: '17' | ||
cache: 'gradle' | ||
|
||
- name: AVD cache | ||
uses: actions/cache@v3 | ||
id: avd-cache | ||
with: | ||
path: | | ||
~/.android/avd/* | ||
~/.android/adb* | ||
key: avd-${{ matrix.emulator_type }}-${{ matrix.android_target }} | ||
|
||
- name: Build Release APK | ||
run: ./gradlew :app:assembleRelease | ||
|
||
- name: Create AVD snapshot | ||
if: steps.avd-cache.outputs.cache-hit != 'true' | ||
uses: reactivecircus/android-emulator-runner@v2 | ||
with: | ||
api-level: ${{ matrix.android_target }} | ||
target: ${{ matrix.emulator_type }} | ||
arch: x86_64 | ||
force-avd-creation: false | ||
emulator-options: -writable-system -no-snapshot-load -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | ||
disable-animations: true | ||
script: | | ||
./app/development/scripts/provision_emulator.sh "test" "system-images;android-${{ matrix.android_target }};${{ matrix.emulator_type }};x86_64" | ||
echo "Generated AVD snapshot for caching." | ||
- name: Assemble tests | ||
run: ./gradlew :app:assembleAndroidTest | ||
|
||
- name: Run tests | ||
uses: reactivecircus/android-emulator-runner@v2 | ||
uses: Wandalen/[email protected] | ||
with: | ||
api-level: ${{ matrix.android_target }} | ||
target: ${{ matrix.emulator_type }} | ||
arch: x86_64 | ||
force-avd-creation: false | ||
emulator-options: -writable-system -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | ||
profile: pixel_6a | ||
heap-size: '512M' | ||
ram-size: '4096M' | ||
disk-size: '14G' | ||
sdcard-path-or-size: '4096M' | ||
cores: 3 | ||
disable-animations: false | ||
script: ./.github/scripts/run_tests.sh | ||
attempt_limit: 3 | ||
action: reactivecircus/android-emulator-runner@v2 | ||
with: | | ||
api-level: ${{ matrix.android_target }} | ||
target: ${{ matrix.emulator_type }} | ||
arch: x86_64 | ||
force-avd-creation: true | ||
emulator-options: -cores 2 -writable-system -no-snapshot-load -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | ||
disk-size: '14G' | ||
sdcard-path-or-size: '4096M' | ||
disable-animations: true | ||
script: | | ||
./app/development/scripts/provision_emulator.sh "test" "system-images;android-${{ matrix.android_target }};${{ matrix.emulator_type }};x86_64" | ||
./.github/scripts/run_tests.sh | ||
- name: Upload test results | ||
if: always() | ||
|
This file contains 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