diff --git a/.github/actions/test-ios-rntester/action.yml b/.github/actions/test-ios-rntester/action.yml index 7f5d83855a8e..d6a4b4604ba3 100644 --- a/.github/actions/test-ios-rntester/action.yml +++ b/.github/actions/test-ios-rntester/action.yml @@ -41,6 +41,27 @@ runs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ inputs.ruby-version }} + bundler: none + - name: Install Bundler + shell: bash + run: | + BUNDLER_VERSION="$(awk '/BUNDLED WITH/{getline; print $1}' Gemfile.lock)" + if [ -z "$BUNDLER_VERSION" ]; then + echo "Could not determine Bundler version from Gemfile.lock." >&2 + exit 1 + fi + for attempt in 1 2 3; do + echo "Attempt $attempt of 3" + if gem install bundler --version "$BUNDLER_VERSION" --no-document; then + exit 0 + fi + if [ "$attempt" -lt 3 ]; then + echo "Attempt $attempt failed. Retrying..." + sleep "$((attempt * 10))" + fi + done + echo "All 3 attempts failed." + exit 1 - name: Set Hermes prebuilt version shell: bash run: | diff --git a/.github/workflows/e2e-ios-rntester.yml b/.github/workflows/e2e-ios-rntester.yml index e0f69be743ae..0660257487bf 100644 --- a/.github/workflows/e2e-ios-rntester.yml +++ b/.github/workflows/e2e-ios-rntester.yml @@ -60,7 +60,8 @@ jobs: steps: - id: check run: | - if [[ "${{ needs.test.outputs.status }}" == "failure" ]]; then + if [[ "${{ needs.test.result }}" != "success" || + "${{ needs.test.outputs.status }}" == "failure" ]]; then echo "status=failure" >> $GITHUB_OUTPUT else echo "status=success" >> $GITHUB_OUTPUT