From 6a2769add161922a223163a9b2b1af3e185e61d8 Mon Sep 17 00:00:00 2001 From: Ryan Stelly Date: Mon, 15 Dec 2025 19:17:40 -0600 Subject: [PATCH] (CI) run detox once (leaner flags) then retry once on failure with recordings / verbose logs (#3294) * MOB-1071 run lean detox once, retry once on failure with recordings / verbose logs * don't retry on status check failure --- .github/workflows/e2e_ios.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e_ios.yml b/.github/workflows/e2e_ios.yml index ad1af4667..491d67a05 100644 --- a/.github/workflows/e2e_ios.yml +++ b/.github/workflows/e2e_ios.yml @@ -213,6 +213,7 @@ jobs: brew install applesimutils - name: Ensure servers are running + id: status_check run: | # is rails running? curl -I --fail "https://staging.inaturalist.org/ping" @@ -220,12 +221,22 @@ jobs: curl -I --fail "https://stagingapi.inaturalist.org/v2/taxa" - name: Run e2e test - run: npm run e2e:test:ios -- --cleanup --take-screenshots failing --record-videos failing --record-logs all -l trace + run: | + npm run e2e:test:ios + + - name: Run e2e test (retry, with logs) + # do not retry if status check fails + if: ${{ failure() && steps.status_check.outcome != 'failure' }} + run: | + # provide more debugging context on retry failure + # we're explicitly not using `detox test --retries` for this reason + npm run e2e:test:ios -- --take-screenshots failing --record-videos failing --record-logs all -l trace # The artifacts for the failing tests are available for download on github.com on the page of the individual actions run - name: Store Detox artifacts on test failure uses: actions/upload-artifact@v4 - if: failure() + # no artifacts if status check fails + if: ${{ failure() && steps.status_check.outcome != 'failure' }} with: name: detox-artifacts path: artifacts