Skip to content

Commit 805b49e

Browse files
committed
👷 Automatic retry for Truffleruby
1 parent dca5133 commit 805b49e

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

.github/workflows/truffle.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,32 @@ jobs:
6262
# NOTE: This does not use the primary Gemfile at all.
6363
- name: Install Root Appraisal
6464
run: bundle
65-
- name: Appraisal for ${{ matrix.appraisal }}
65+
66+
- name: "[Attempt 1] Install Root Appraisal"
67+
id: bundleAttempt1
68+
run: bundle
69+
# Continue to the next step on failure
70+
continue-on-error: true
71+
72+
# Effectively an automatic retry of the previous step.
73+
- name: "[Attempt 2] Install Root Appraisal"
74+
id: bundleAttempt2
75+
# If bundleAttempt1 failed, try again here; Otherwise skip.
76+
if: steps.bundleAttempt1.outcome == 'failure'
77+
run: bundle
78+
79+
- name: "[Attempt 1] Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal }}"
80+
id: bundleAppraisalAttempt1
81+
run: bundle exec appraisal ${{ matrix.appraisal }} bundle
82+
# Continue to the next step on failure
83+
continue-on-error: true
84+
85+
# Effectively an automatic retry of the previous step.
86+
- name: "[Attempt 2] Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal }}"
87+
id: bundleAppraisalAttempt2
88+
# If bundleAttempt1 failed, try again here; Otherwise skip.
89+
if: steps.bundleAppraisalAttempt1.outcome == 'failure'
6690
run: bundle exec appraisal ${{ matrix.appraisal }} bundle
91+
6792
- name: Tests for ${{ matrix.ruby }} via ${{ matrix.exec_cmd }}
6893
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }}

0 commit comments

Comments
 (0)