Skip to content

Commit 90721b3

Browse files
authored
Update retry logic for flaky tests (#12998)
1 parent dfd6149 commit 90721b3

File tree

2 files changed

+29
-11
lines changed

2 files changed

+29
-11
lines changed

.github/workflows/crashlytics.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
- uses: nick-fields/retry@v3
103103
with:
104104
timeout_minutes: 120
105-
max_attempts: 3
105+
max_attempts: 5
106106
retry_on: error
107107
retry_wait_seconds: 120
108108
command: scripts/test_catalyst.sh FirebaseCrashlytics test FirebaseCrashlytics-Unit-unit
@@ -198,5 +198,10 @@ jobs:
198198
- uses: ruby/setup-ruby@v1
199199
- name: Setup Bundler
200200
run: scripts/setup_bundler.sh
201-
- name: PodLibLint Auth Cron
202-
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCrashlytics.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
201+
- uses: nick-fields/retry@v3
202+
with:
203+
timeout_minutes: 120
204+
max_attempts: 3
205+
retry_on: error
206+
retry_wait_seconds: 120
207+
command: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCrashlytics.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}

.github/workflows/sessions.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,13 @@ jobs:
4141
run: scripts/setup_bundler.sh
4242
- name: Xcode
4343
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
44-
- name: Build and test
45-
run: |
46-
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseSessions.podspec \
47-
--platforms=${{ matrix.target }} ${{ matrix.tests }}
44+
- uses: nick-fields/retry@v3
45+
with:
46+
timeout_minutes: 120
47+
max_attempts: 3
48+
retry_on: error
49+
retry_wait_seconds: 120
50+
command: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseSessions.podspec --platforms=${{ matrix.target }} ${{ matrix.tests }}
4851

4952
spm:
5053
# Don't run on private repo unless it is a PR.
@@ -71,8 +74,13 @@ jobs:
7174
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
7275
- name: Initialize xcodebuild
7376
run: scripts/setup_spm_tests.sh
74-
- name: Unit Tests
75-
run: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseSessionsUnit ${{ matrix.target }} spm
77+
- uses: nick-fields/retry@v3
78+
with:
79+
timeout_minutes: 120
80+
max_attempts: 3
81+
retry_on: error
82+
retry_wait_seconds: 120
83+
command: scripts/third_party/travis/retry.sh ./scripts/build.sh FirebaseSessionsUnit ${{ matrix.target }} spm
7684

7785
catalyst:
7886
# Don't run on private repo unless it is a PR.
@@ -87,5 +95,10 @@ jobs:
8795
- uses: ruby/setup-ruby@v1
8896
- name: Setup Bundler
8997
run: scripts/setup_bundler.sh
90-
- name: Setup project and Build for Catalyst
91-
run: scripts/test_catalyst.sh FirebaseSessions test FirebaseSessions-Unit-unit
98+
- uses: nick-fields/retry@v3
99+
with:
100+
timeout_minutes: 120
101+
max_attempts: 3
102+
retry_on: error
103+
retry_wait_seconds: 120
104+
command: scripts/test_catalyst.sh FirebaseSessions test FirebaseSessions-Unit-unit

0 commit comments

Comments
 (0)