Skip to content

Commit

Permalink
chore(ci): Set retryOnFailure for RNTester iOS Unit and Integration…
Browse files Browse the repository at this point in the history
… tests (facebook#44642)

Summary:
On React Native macOS (I am not sure with the current state of React Native), the Xcode Unit and Integration tests are a bit flaky. Rather than set "retry on failure up to 3 times" through the pipeline config (in our case, Azure Pipelines), I realized my earlier PR to use Xcode test plans (facebook#36443) means we can have Xcode retry the test. This should be faster than retrying it on the pipeline, because it retries just the failing test, not the entire "test" step. I did this on React Native macOS, so I'm doing it upstream so we can remove a diff.

## Changelog:

[INTERNAL] [CHANGED] - Set `retryOnFailure` for Xcode Unit and Integration tests

Pull Request resolved: facebook#44642

Test Plan: CI should pass (faster)

Reviewed By: cortinico

Differential Revision: D57662523

Pulled By: cipolleschi

fbshipit-source-id: 8de2ab0ea15ba4d38c3b5bf96108c0c7ff5e9f32
  • Loading branch information
Saadnajmi authored and facebook-github-bot committed May 30, 2024
1 parent e91a577 commit c67dfbb
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .circleci/configurations/commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ commands:
steps:
- run:
name: "Run Tests: iOS Unit and Integration Tests"
command: node ./scripts/circleci/run_with_retry.js 3 yarn test-ios
command: yarn test-ios
- run:
name: Zip Derived data folder
when: always
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/test_ios_rntester/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ runs:
- name: "Run Tests: iOS Unit and Integration Tests"
if: ${{ inputs.run-unit-tests == true }}
shell: bash
run: node ./scripts/circleci/run_with_retry.js 3 yarn test-ios
run: yarn test-ios
- name: Zip Derived data folder
if: ${{ inputs.run-unit-tests == true }}
shell: bash
Expand Down
1 change: 1 addition & 0 deletions packages/rn-tester/RNTester/RNTester.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"identifier" : "13B07F861A680F5B00A75B9A",
"name" : "RNTester"
},
"testRepetitionMode" : "retryOnFailure",
"undefinedBehaviorSanitizerEnabled" : true
},
"testTargets" : [
Expand Down
32 changes: 0 additions & 32 deletions scripts/circleci/run_with_retry.js

This file was deleted.

0 comments on commit c67dfbb

Please sign in to comment.