Skip to content

Commit

Permalink
ci: upload recordings
Browse files Browse the repository at this point in the history
  • Loading branch information
sandipndev committed Feb 14, 2024
1 parent aa2c0bd commit ff9ce75
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 18 deletions.
7 changes: 0 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,3 @@ workflows:
- equal: ["api", << pipeline.trigger_source >>]
jobs:
- upload_to_app_store
test_in_pr:
when:
not:
equal: [main, << pipeline.git.branch >>]
jobs:
- test_android_in_pr
- test_ios_in_pr
45 changes: 34 additions & 11 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: E2E

on: [push]
on: [pull_request]

jobs:
build-e2e-android:
Expand All @@ -25,12 +25,6 @@ jobs:
key: ${{ runner.os }}-deps-${{ hashFiles('**/yarn.lock', '**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-deps-
- uses: actions/cache@v2
with:
path: |
android/.gradle
android/app/build
key: ${{ runner.os }}-android-deps-${{ hashFiles('**/yarn.lock', '**/Podfile.lock') }}
- run: npm i -g yarn
- uses: android-actions/setup-android@v3
Expand Down Expand Up @@ -89,13 +83,36 @@ jobs:
yarn start &
echo "METRO_PID=$!" >> $GITHUB_ENV
- name: Run Detox Tests
- 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
arch: x86_64
script: yarn e2e:test android.emu.debug --headless -d -R 3 --take-screenshots all --record-videos all --record-logs all --headless

- 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
arch: x86_64
script: yarn e2e:test android.emu.debug --headless -d -R 3 --take-screenshots all --record-videos all --record-logs all --headless

- 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

Expand Down Expand Up @@ -184,10 +201,16 @@ jobs:
done
exit 1
- run: yarn e2e:test ios.sim.debug --headless -d -R 3
- run: yarn e2e:test ios.sim.debug -d -R 5 --take-screenshots all --record-videos all --record-logs all --headless

- uses: actions/upload-artifact@v4
with:
name: recordings
path: artifacts

- run: killall Simulator
if: always()
continue-on-error: true

- name: Terminate Metro
if: always()
continue-on-error: true
Expand Down

0 comments on commit ff9ce75

Please sign in to comment.