diff --git a/.circleci/config.yml b/.circleci/config.yml index b716020d93..05a7003cfb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 831e65806f..5db8a9d7c8 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -1,6 +1,6 @@ name: E2E -on: [push] +on: [pull_request] jobs: build-e2e-android: @@ -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 @@ -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 @@ -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