-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run sample Android tests on their own job
This allows running on Linux with nested KVM rather than on Macs.
- Loading branch information
1 parent
2ca0190
commit d89a785
Showing
1 changed file
with
51 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ jobs: | |
|
||
- run: ./gradlew kotlinUpgradeYarnLock build -PredwoodNoApps | ||
|
||
connected: | ||
emulator-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Enable KVM group perms | ||
|
@@ -115,15 +115,35 @@ jobs: | |
|
||
- run: ./gradlew -p samples/counter build | ||
|
||
- name: Build Counter iOS (UIKit) | ||
run: xcodebuild -project samples/counter/ios-uikit/CounterApp.xcodeproj -scheme CounterApp -destination 'platform=iOS Simulator,name=iPhone 12,OS=latest' | ||
|
||
sample-counter-emulator: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- 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 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/[email protected] | ||
with: | ||
distribution: 'zulu' | ||
java-version: 21 | ||
|
||
- uses: gradle/gradle-build-action@v2 | ||
# Don't spend more than 5m rehydrating the cache. Otherwise just move on. | ||
timeout-minutes: 5 | ||
continue-on-error: true | ||
|
||
- uses: reactivecircus/android-emulator-runner@v2 | ||
with: | ||
api-level: 29 | ||
emulator-boot-timeout: 20000 | ||
script: ./gradlew -p samples/counter connectedCheck | ||
|
||
- name: Build Counter iOS (UIKit) | ||
run: xcodebuild -project samples/counter/ios-uikit/CounterApp.xcodeproj -scheme CounterApp -destination 'platform=iOS Simulator,name=iPhone 12,OS=latest' | ||
|
||
sample-emoji: | ||
runs-on: macos-latest | ||
steps: | ||
|
@@ -140,15 +160,35 @@ jobs: | |
|
||
- run: ./gradlew -p samples/emoji-search build | ||
|
||
- name: Build Emoji Search iOS (UIKit) | ||
run: xcodebuild -project samples/emoji-search/ios-uikit/EmojiSearchApp.xcodeproj -scheme EmojiSearchApp -destination 'platform=iOS Simulator,name=iPhone 12,OS=latest' | ||
|
||
sample-emoji-emulator: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- 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 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/[email protected] | ||
with: | ||
distribution: 'zulu' | ||
java-version: 21 | ||
|
||
- uses: gradle/gradle-build-action@v2 | ||
# Don't spend more than 5m rehydrating the cache. Otherwise just move on. | ||
timeout-minutes: 5 | ||
continue-on-error: true | ||
|
||
- uses: reactivecircus/android-emulator-runner@v2 | ||
with: | ||
api-level: 29 | ||
emulator-boot-timeout: 20000 | ||
script: ./gradlew -p samples/emoji-search connectedCheck | ||
|
||
- name: Build Emoji Search iOS (UIKit) | ||
run: xcodebuild -project samples/emoji-search/ios-uikit/EmojiSearchApp.xcodeproj -scheme EmojiSearchApp -destination 'platform=iOS Simulator,name=iPhone 12,OS=latest' | ||
|
||
test-app: | ||
runs-on: macos-latest | ||
steps: | ||
|
@@ -173,11 +213,13 @@ jobs: | |
if: ${{ github.ref == 'refs/heads/trunk' && github.repository == 'cashapp/redwood' }} | ||
needs: | ||
- build | ||
- connected | ||
- dokka | ||
- emulator-tests | ||
- screenshot-tests | ||
- sample-counter | ||
- sample-counter-emulator | ||
- sample-emoji | ||
- screenshot-tests | ||
- sample-emoji-emulator | ||
- test-app | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|