2023-09-13 00:17:39 +02:00
|
|
|
container:
|
|
|
|
image: ghcr.io/cirruslabs/android-sdk:33
|
|
|
|
kvm: true
|
|
|
|
cpu: 8
|
|
|
|
memory: 16G
|
|
|
|
|
2023-09-14 08:37:38 +02:00
|
|
|
instrumentation_tests_task:
|
|
|
|
name: "Cirrus CI Instrumentation Tests"
|
2023-09-13 00:17:39 +02:00
|
|
|
skip: "!changesInclude('.cirrus.yml', '*.gradle', '*.gradle.kts', '**/*.gradle', '**/*.gradle.kts', '*.properties', '**/*.properties', '**/*.kt', '**/*.xml')"
|
|
|
|
start_avd_background_script:
|
|
|
|
sdkmanager --install "system-images;android-33;google_apis;x86_64";
|
|
|
|
echo no | avdmanager create avd -n seedvault -k "system-images;android-33;google_apis;x86_64";
|
|
|
|
$ANDROID_HOME/emulator/emulator
|
|
|
|
-avd seedvault
|
|
|
|
-no-audio
|
|
|
|
-no-boot-anim
|
|
|
|
-gpu swiftshader_indirect
|
|
|
|
-no-snapshot
|
|
|
|
-no-window
|
|
|
|
-writable-system;
|
|
|
|
provision_avd_background_script:
|
2023-09-14 08:37:38 +02:00
|
|
|
wget https://github.com/seedvault-app/seedvault-test-data/releases/download/1/backup.tar.gz;
|
2023-09-13 00:17:39 +02:00
|
|
|
|
2023-09-14 08:37:38 +02:00
|
|
|
adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;';
|
2023-09-13 00:17:39 +02:00
|
|
|
adb root;
|
|
|
|
sleep 5;
|
|
|
|
adb remount;
|
|
|
|
adb reboot;
|
|
|
|
adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;';
|
|
|
|
adb root;
|
|
|
|
sleep 5;
|
|
|
|
adb remount;
|
2023-09-14 08:37:38 +02:00
|
|
|
sleep 5;
|
|
|
|
assemble_script:
|
2023-09-13 00:17:39 +02:00
|
|
|
./gradlew :app:assembleRelease :app:assembleAndroidTest
|
|
|
|
install_app_script:
|
|
|
|
timeout 180s bash -c 'while [[ -z $(adb shell mount | grep "/system " | grep "(rw,") ]]; do sleep 1; done;';
|
|
|
|
adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;';
|
2023-09-14 08:37:38 +02:00
|
|
|
|
|
|
|
adb shell mkdir -p /sdcard/seedvault_baseline;
|
|
|
|
adb push backup.tar.gz /sdcard/seedvault_baseline/backup.tar.gz;
|
|
|
|
adb shell tar xzf /sdcard/seedvault_baseline/backup.tar.gz --directory=/sdcard/seedvault_baseline;
|
|
|
|
|
2023-09-13 00:17:39 +02:00
|
|
|
adb shell mkdir -p /system/priv-app/Seedvault;
|
|
|
|
adb push app/build/outputs/apk/release/app-release.apk /system/priv-app/Seedvault/Seedvault.apk;
|
|
|
|
adb push permissions_com.stevesoltys.seedvault.xml /system/etc/permissions/privapp-permissions-seedvault.xml;
|
|
|
|
adb push allowlist_com.stevesoltys.seedvault.xml /system/etc/sysconfig/allowlist-seedvault.xml;
|
|
|
|
adb shell bmgr enable true;
|
|
|
|
adb shell bmgr transport com.stevesoltys.seedvault.transport.ConfigurableBackupTransport;
|
|
|
|
adb reboot;
|
|
|
|
adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;';
|
|
|
|
run_large_tests_script: ./gradlew -Pinstrumented_test_size=large :app:connectedAndroidTest
|
|
|
|
run_medium_tests_script: ./gradlew -Pinstrumented_test_size=medium :app:connectedAndroidTest
|
|
|
|
always:
|
|
|
|
pull_screenshots_script:
|
2023-09-14 08:37:38 +02:00
|
|
|
adb pull /sdcard/seedvault_test_videos
|
2023-09-13 00:17:39 +02:00
|
|
|
screenshots_artifacts:
|
2023-09-14 08:37:38 +02:00
|
|
|
path: "seedvault_test_videos/**/*.mp4"
|