-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e6808df
commit 46d9943
Showing
4 changed files
with
118 additions
and
25 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
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
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 |
---|---|---|
@@ -0,0 +1,117 @@ | ||
name: E2E | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
build-e2e-android: | ||
name: Build APK | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 20 | ||
- uses: actions/setup-java@v2 | ||
with: | ||
java-version: "11" | ||
distribution: "adopt" | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
node_modules | ||
ios/Pods | ||
key: ${{ runner.os }}-deps-${{ hashFiles('**/yarn.lock', '**/Podfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-deps- | ||
- run: NOPOSTINSTALLPODS=1 yarn install | ||
- name: Build app | ||
run: yarn e2e:build android.emu.debug | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: built-e2e-apk | ||
path: android/app/build/outputs | ||
|
||
test-e2e-android: | ||
name: Run Detox Tests | ||
runs-on: ubuntu-latest | ||
needs: build-e2e-android | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: built-e2e-apk | ||
path: android/app/build/outputs | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 20 | ||
- uses: actions/setup-java@v2 | ||
with: | ||
java-version: "11" | ||
distribution: "adopt" | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
node_modules | ||
ios/Pods | ||
key: ${{ runner.os }}-deps-${{ hashFiles('**/yarn.lock', '**/Podfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-deps- | ||
- run: NOPOSTINSTALLPODS=1 yarn install | ||
- name: Start Metro | ||
run: | | ||
yarn start & | ||
echo "METRO_PID=$!" >> $GITHUB_ENV | ||
- uses: DeterminateSystems/nix-installer-action@v4 | ||
- uses: DeterminateSystems/magic-nix-cache-action@v2 | ||
- name: Run local backend in background | ||
run: | | ||
nix develop -c make tilt-up & | ||
sleep 30 | ||
- run: nix develop -c tilt wait --timeout 1h --for=condition=Ready uiresources init-setup | ||
- name: Run Detox Tests (test attempt 1) | ||
continue-on-error: true | ||
id: test1 | ||
uses: reactivecircus/android-emulator-runner@v2 | ||
with: | ||
api-level: 29 | ||
avd-name: Pixel_API_29_AOSP | ||
force-avd-creation: false | ||
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none -camera-front none -partition-size 2047 | ||
arch: x86_64 | ||
script: yarn e2e:test android.emu.debug --headless -d -R 3 | ||
|
||
- name: Run Detox Tests (test attempt 2) | ||
continue-on-error: true | ||
id: test2 | ||
if: steps.test1.outcome != 'success' | ||
uses: reactivecircus/android-emulator-runner@v2 | ||
with: | ||
api-level: 29 | ||
avd-name: Pixel_API_29_AOSP | ||
force-avd-creation: false | ||
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none -camera-front none -partition-size 2047 | ||
arch: x86_64 | ||
script: yarn e2e:test android.emu.debug --headless -d -R 3 | ||
|
||
- name: Run Detox Tests (test attempt 3) | ||
if: steps.test1.outcome != 'success' && steps.test2.outcome != 'success' | ||
uses: reactivecircus/android-emulator-runner@v2 | ||
with: | ||
api-level: 29 | ||
avd-name: Pixel_API_29_AOSP | ||
force-avd-creation: false | ||
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none -camera-front none -partition-size 2047 | ||
arch: x86_64 | ||
script: yarn e2e:test android.emu.debug --headless -d -R 3 | ||
|
||
# TODO: Store Artifacts in a bucket and get link | ||
|
||
- name: Terminate Metro | ||
if: always() | ||
continue-on-error: true | ||
run: kill $METRO_PID |
This file was deleted.
Oops, something went wrong.