Skip to content

Commit

Permalink
fix: GitHub CI, uninstall package before running integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentKobz committed May 17, 2024
1 parent c56ab58 commit f94f053
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
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/
3 changes: 2 additions & 1 deletion enioka_scan/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions enioka_scan/multidex.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-keep class **Test { *; }

0 comments on commit f94f053

Please sign in to comment.