2023-10-08 20:16:53 +02:00
|
|
|
name: Run instrumentation tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2023-10-10 03:08:05 +02:00
|
|
|
branches:
|
|
|
|
- android*
|
|
|
|
pull_request:
|
2023-10-08 20:16:53 +02:00
|
|
|
|
2023-10-08 20:18:12 +02:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2023-10-08 20:16:53 +02:00
|
|
|
jobs:
|
|
|
|
instrumentation_tests:
|
|
|
|
runs-on: macos-11
|
2023-10-12 08:13:34 +02:00
|
|
|
if: github.repository == 'seedvault-app/seedvault'
|
|
|
|
timeout-minutes: 80
|
2023-10-08 20:16:53 +02:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-02-26 14:48:56 +01:00
|
|
|
android_target: [ 34 ]
|
2024-03-07 21:30:35 +01:00
|
|
|
emulator_type: [ aosp_atd ]
|
2024-01-12 06:12:43 +01:00
|
|
|
d2d_backup_test: [ true, false ]
|
2023-10-08 20:16:53 +02:00
|
|
|
steps:
|
|
|
|
- name: Checkout Code
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- uses: actions/setup-java@v3
|
|
|
|
with:
|
|
|
|
distribution: 'adopt'
|
|
|
|
java-version: '17'
|
|
|
|
cache: 'gradle'
|
|
|
|
|
|
|
|
- name: Build Release APK
|
|
|
|
run: ./gradlew :app:assembleRelease
|
|
|
|
|
|
|
|
- name: Assemble tests
|
|
|
|
run: ./gradlew :app:assembleAndroidTest
|
|
|
|
|
|
|
|
- name: Run tests
|
2023-10-12 08:13:34 +02:00
|
|
|
uses: Wandalen/wretry.action@v1.3.0
|
2023-10-08 20:16:53 +02:00
|
|
|
with:
|
2024-02-26 15:22:34 +01:00
|
|
|
attempt_limit: 1
|
2023-10-12 08:13:34 +02:00
|
|
|
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"
|
2024-01-12 06:12:43 +01:00
|
|
|
./.github/scripts/run_tests.sh ${{ matrix.d2d_backup_test }}
|
2023-10-12 08:13:34 +02:00
|
|
|
|
|
|
|
- name: Upload test results
|
2023-10-08 20:16:53 +02:00
|
|
|
if: always()
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2023-10-12 08:13:34 +02:00
|
|
|
name: ${{ matrix.emulator_type }}-${{ matrix.android_target }}-results
|
|
|
|
path: seedvault_test_results/**/*
|