diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b799aea5..6440c854 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -14,6 +14,11 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: Enable KVM + 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: Set up environment uses: actions/setup-java@v4 with: @@ -26,7 +31,7 @@ jobs: id: avd-cache with: path: | - ~.android/avd/* + ~/.android/avd/* ~/.android/adb* key: avd-${{ matrix.api-level }} - name: Create AVD and generate snapshot for caching @@ -47,4 +52,11 @@ jobs: force-avd-creation: false emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: true - script: ./gradlew connectedCheck \ No newline at end of file + script: adb uninstall com.enioka.scanner.sdk.mock.test; adb uninstall com.enioka.scanner.service; ./gradlew connectedCheck --stacktrace + + - name: Upload stacktrace + if: always() + uses: actions/upload-artifact@v2 + with: + name: stacktrace + path: /home/runner/work/enioka_scan/enioka_scan/enioka_scan/build/reports/androidTests/connected/debug/ \ No newline at end of file diff --git a/enioka_scan/build.gradle b/enioka_scan/build.gradle index 1a12833a..60c3856a 100644 --- a/enioka_scan/build.gradle +++ b/enioka_scan/build.gradle @@ -7,7 +7,8 @@ android { defaultConfig { minSdkVersion 19 targetSdkVersion 28 - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' + multiDexKeepProguard file('multidex.pro') multiDexEnabled true } buildTypes { diff --git a/enioka_scan/multidex.pro b/enioka_scan/multidex.pro new file mode 100644 index 00000000..5bb944dc --- /dev/null +++ b/enioka_scan/multidex.pro @@ -0,0 +1 @@ +-keep class **Test { *; } \ No newline at end of file