chore: bump andymckay/cancel-action from 435124153eb37d6a62a29d053a7e449652f89d51 to a955d435292c0d409d104b57d8e78435a93a6ef1 #2008
Workflow file for this run
This file contains hidden or 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
| name: "Cross Platform Tests" | |
| on: | |
| pull_request | |
| jobs: | |
| cross-platform-tests: | |
| timeout-minutes: 30 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "Checkout Cross Platform Tests Repo" | |
| uses: actions/checkout@v5 | |
| with: | |
| repository: mParticle/crossplatform-sdk-tests | |
| - name: "Checkout Android SDK Branch" | |
| uses: actions/checkout@v5 | |
| with: | |
| repository: ${{github.event.pull_request.head.repo.full_name}} | |
| ref: ${{github.head_ref}} | |
| path: .sdks/android | |
| - name: Gradle cache | |
| uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a #v2.9.0 | |
| - name: AVD cache | |
| uses: actions/cache@v3 | |
| id: avd-cache | |
| with: | |
| path: | | |
| ~/.android/avd/* | |
| ~/.android/adb* | |
| key: avd-cache | |
| - name: create AVD and generate snapshot for caching | |
| if: steps.avd-cache.outputs.cache-hit != 'true' | |
| uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d #v2.33.0 | |
| with: | |
| api-level: 29 | |
| force-avd-creation: false | |
| emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
| disable-animations: false | |
| script: echo "Generated AVD snapshot for caching." | |
| - name: Enable KVM group perms | |
| 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: "Install JDK 17" | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: "zulu" | |
| java-version: "17" | |
| - name: "Run Crossplatform Tests" | |
| uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d #v2.33.0 | |
| with: | |
| api-level: 29 | |
| 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: | | |
| adb uninstall com.mparticle.kittests || true | |
| adb uninstall com.mparticle.kits.test || true | |
| adb uninstall com.mparticle.legacyTest || true | |
| adb uninstall com.mparticle.test || true | |
| adb uninstall com.mparticle.cpt.testing.test || true | |
| ./gradlew runAndroid | |
| - name: "Archive Test Results" | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: "test-results" | |
| path: Tests/build/reports/androidTests/connected/** |