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

Run sample Android tests on their own job #1800

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 51 additions & 9 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

- run: ./gradlew kotlinUpgradeYarnLock build -PredwoodNoApps

connected:
emulator-tests:
runs-on: ubuntu-latest
steps:
- name: Enable KVM group perms
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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
Expand Down
Loading