Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update emulator version tag #537

Merged
merged 12 commits into from
Jan 24, 2025
18 changes: 11 additions & 7 deletions .github/workflows/cross-platform-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
jobs:
cross-platform-tests:
timeout-minutes: 30
runs-on: macOS-15
runs-on: ubuntu-latest
steps:
- name: "Checkout Cross Platform Tests Repo"
uses: actions/checkout@v3
Expand Down Expand Up @@ -32,21 +32,25 @@ jobs:

- name: create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #v2.28.0
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: "Install JDK 11"
- 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: "11"
java-version: "17"
- name: "Run Crossplatform Tests"
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #v2.28.0
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d #v2.33.0
with:
api-level: 29
force-avd-creation: false
Expand All @@ -55,7 +59,7 @@ jobs:
script: ./gradlew runAndroid
- name: "Archive Test Results"
if: ${{ always() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: "test-results"
path: Tests/build/reports/androidTests/connected/**
26 changes: 13 additions & 13 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,16 @@ jobs:
java-version: "17"
cache: "gradle"
- name: "Run Instrumented Tests"
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #v2.28.0
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d #v2.33.0
with:
api-level: 29
#script: ./gradlew :android-core:cAT :android-kit-base:cAT --stacktrace
script: |
#Disable benchmark tests as they do not work on emulators
adb uninstall com.mparticle.kits.test; ./gradlew connectedCheck --stacktrace
./gradlew :android-core:cAT :android-kit-base:cAT -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=none
#Disable benchmark tests as they do not work on emulators
adb uninstall com.mparticle.kits.test; ./gradlew connectedCheck --stacktrace
./gradlew :android-core:cAT :android-kit-base:cAT -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=none
- name: "Archive Instrumented Test Results"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: instrumented-test-results
Expand All @@ -115,12 +115,12 @@ jobs:
java-version: "17"
cache: "gradle"
- name: "Run Instrumented Orchestrator Tests"
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #v2.28.0
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d #v2.33.0
with:
api-level: 29
script: ./gradlew -Porchestrator=true :android-core:cAT --stacktrace
- name: "Archive Instrumented Orchestrator Tests Results"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: "instrumented-orchestrator-tests-results"
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
uses: asadmansr/android-test-report-action@384cd31388782f4106dc4a1b37eea2ff02e0aad7 #v1.2.0
if: always()
- name: "Archive Unit Test Results"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: "unit-tests-results"
Expand Down Expand Up @@ -179,13 +179,13 @@ jobs:
- name: "Run Android Kit Lint"
run: ./gradlew publishReleaseLocal -c settings-kits.gradle lint
- name: "Archive Test Results"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: "core-lint-results"
path: ./**/build/reports/**
- name: "Archive Test Kit Results"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: "kit-lint-results"
Expand Down Expand Up @@ -215,13 +215,13 @@ jobs:
- name: "Run Android Kit Kotlin Lint"
run: ./gradlew publishReleaseLocal -c settings-kits.gradle ktlintCheck
- name: "Archive Test Results"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: "core-ktlint-results"
path: ./**/build/reports/**
- name: "Archive Test Kit Results"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: "kit-ktlint-results"
Expand Down Expand Up @@ -256,7 +256,7 @@ jobs:

semantic-release-dryrun:
name: "Test Semantic Release - Dry Run"
needs: [instrumented-tests, instrumented-orchestrator-tests, unit-tests, lint-checks, kotlin-lint-checks, update-kits]
needs: [ instrumented-tests, instrumented-orchestrator-tests, unit-tests, lint-checks, kotlin-lint-checks, update-kits ]
runs-on: macos-latest
env:
GITHUB_TOKEN: ${{ secrets.MP_SEMANTIC_RELEASE_BOT }}
Expand Down
74 changes: 37 additions & 37 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
key: avd-29
- name: create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #v2.28.0
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d #v2.33.0
with:
api-level: 29
force-avd-creation: false
Expand All @@ -37,11 +37,11 @@ jobs:
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
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: "Run Instrumented Tests"
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #v2.28.0
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d #v2.33.0
with:
api-level: 29
force-avd-creation: false
Expand All @@ -53,7 +53,7 @@ jobs:
adb uninstall com.mparticle.kits.test; ./gradlew connectedCheck --stacktrace
./gradlew :android-core:cAT :android-kit-base:cAT -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=none
- name: "Archive Instrumented Tests Results"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: "instrumented-tests-results"
Expand All @@ -76,7 +76,7 @@ jobs:

- name: create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #v2.28.0
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d #v2.33.0
with:
api-level: 29
force-avd-creation: false
Expand All @@ -89,18 +89,18 @@ jobs:
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: "Run Instrumented Orchestrator Tests"
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #v2.28.0
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: |
# Disable benchmark tests as they do not work on emulators
adb uninstall com.mparticle.test; ./gradlew connectedCheck --stacktrace
./gradlew -Porchestrator=true :android-core:cAT -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=none
# Disable benchmark tests as they do not work on emulators
adb uninstall com.mparticle.test; ./gradlew connectedCheck --stacktrace
./gradlew -Porchestrator=true :android-core:cAT -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=none
- name: "Archive Instrumented Orchestrator Tests Results"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: "instrumented-orchestrator-tests-results"
Expand All @@ -123,7 +123,7 @@ jobs:
uses: asadmansr/android-test-report-action@384cd31388782f4106dc4a1b37eea2ff02e0aad7 #v1.2.0
if: always()
- name: "Archive Unit Test Results"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: "unit-tests-results"
Expand All @@ -146,7 +146,7 @@ jobs:
- name: "Run Android Core SDK Lint"
run: ./gradlew lint
- name: "Archive Lint Test Results"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: "lint-results"
Expand All @@ -169,7 +169,7 @@ jobs:
- name: "Run Android Core SDK Kotlin Lint"
run: ./gradlew ktlintCheck
- name: "Archive Kotlin Lint Test Results"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: "kotlin-lint-results"
Expand All @@ -182,28 +182,28 @@ jobs:
base_branch: "development"

kit-compatibility-test:
name: "Kit Compatibility Test"
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: "Checkout Branch"
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: "Install JDK 17"
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "17"
- name: "Get Latest Kits"
run: git submodule foreach "git rebase main"
- name: "Generate Core Release Build"
run: ./gradlew -PisRelease=true publishLocal
- name: "Run Kit-Base Release Tests and Build"
run: ./gradlew -PisRelease=true :android-kit-base:testRelease
- name: "Run Kit Release Tests and Build"
run: ./gradlew -PisRelease=true -p kits testRelease -c ../settings-kits.gradle
name: "Kit Compatibility Test"
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: "Checkout Branch"
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: "Install JDK 17"
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "17"
- name: "Get Latest Kits"
run: git submodule foreach "git rebase main"
- name: "Generate Core Release Build"
run: ./gradlew -PisRelease=true publishLocal
- name: "Run Kit-Base Release Tests and Build"
run: ./gradlew -PisRelease=true :android-kit-base:testRelease
- name: "Run Kit Release Tests and Build"
run: ./gradlew -PisRelease=true -p kits testRelease -c ../settings-kits.gradle

automerge-dependabot:
name: "Save PR Number for Dependabot Automerge"
Expand Down
Loading