@@ -29,18 +29,19 @@ concurrency:
2929
3030jobs :
3131 test :
32- name : Specs ${{ matrix.ruby }}@${{ matrix.appraisal }}
3332 if : " !contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
33+ name : Specs ${{ matrix.ruby }}@${{ matrix.appraisal }}${{ matrix.name_extra || '' }}
3434 runs-on : ubuntu-latest
3535 continue-on-error : ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
3636 env : # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps
3737 BUNDLE_GEMFILE : ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile
3838 strategy :
39+ fail-fast : true
3940 matrix :
4041 include :
4142 # Ruby 3.4
4243 - ruby : " ruby"
43- appraisal : " current-runtime -heads"
44+ appraisal : " dep -heads"
4445 exec_cmd : " rake test"
4546 gemfile : " Appraisal.root"
4647 rubygems : latest
@@ -50,25 +51,27 @@ jobs:
5051 # (according to documentation: targets Ruby 3.3 compatibility)
5152 # (according to runtime: targets Ruby 3.2 compatibility)
5253 - ruby : " truffleruby"
53- appraisal : " current-runtime -heads"
54+ appraisal : " dep -heads"
5455 exec_cmd : " rake test"
5556 gemfile : " Appraisal.root"
5657 rubygems : default
5758 bundler : default
5859
5960 # jruby-10.0 (targets Ruby 3.4 compatibility)
6061 - ruby : " jruby"
61- appraisal : " current-runtime -heads"
62+ appraisal : " dep -heads"
6263 exec_cmd : " rake test"
6364 gemfile : " Appraisal.root"
6465 rubygems : default
6566 bundler : default
6667
6768 steps :
6869 - name : Checkout
70+ if : ${{ !(env.ACT && startsWith(matrix.ruby, 'jruby')) }}
6971 uses : actions/checkout@v5
7072
7173 - name : Setup Ruby & RubyGems
74+ if : ${{ !(env.ACT && startsWith(matrix.ruby, 'jruby')) }}
7275 uses : ruby/setup-ruby@v1
7376 with :
7477 ruby-version : ${{ matrix.ruby }}
7982 # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root)
8083 # We need to do this first to get appraisal installed.
8184 # NOTE: This does not use the primary Gemfile at all.
82- - name : Install Root Appraisal
85+ - name : " Install Root Appraisal"
86+ if : ${{ !(env.ACT && startsWith(matrix.ruby, 'jruby')) }}
8387 run : bundle
84- - name : Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal }}
88+
89+ - name : " [Attempt 1] Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal }}"
90+ if : ${{ !(env.ACT && startsWith(matrix.ruby, 'jruby')) }}
91+ id : bundleAttempt1
92+ run : bundle exec appraisal ${{ matrix.appraisal }} bundle
93+ # Continue to the next step on failure
94+ continue-on-error : true
95+
96+ # Effectively an automatic retry of the previous step.
97+ - name : " [Attempt 2] Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal }}"
98+ # If bundleAttempt1 failed, try again here; Otherwise skip.
99+ if : ${{ steps.bundleAttempt1.outcome == 'failure' && !(env.ACT && startsWith(matrix.ruby, 'jruby')) }}
100+ id : bundleAttempt2
85101 run : bundle exec appraisal ${{ matrix.appraisal }} bundle
102+
86103 - name : Tests for ${{ matrix.ruby }}@${{ matrix.appraisal }} via ${{ matrix.exec_cmd }}
104+ if : ${{ !(env.ACT && startsWith(matrix.ruby, 'jruby')) }}
87105 run : bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }}
0 commit comments