Skip to content

Commit 6d2b36e

Browse files
authored
Update rubyonrails.yml
Signed-off-by: Robert Smith <[email protected]>
1 parent bd771bb commit 6d2b36e

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/rubyonrails.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,27 +50,30 @@ jobs:
5050
uses: ruby/setup-ruby@v1
5151
with:
5252
ruby-version: ${{ matrix.ruby }}
53-
bundler-cache: ${{ matrix.rails == '7.1.5.1' }}
53+
bundler-cache: true
54+
# unique cache per rails version so 7.2 / 8.0 don’t clobber 7.1
55+
cache-version: rails-${{ matrix.rails }}
5456

5557
# Updating Rails can legitimately blow up on the experimental tracks,
5658
# so we allow that *step* to error out without failing the job.
5759
- name: Update Rails
60+
id: update
5861
if: matrix.rails != '7.1.5.1'
5962
run: |
6063
bundle config set deployment false
6164
bundle update rails --conservative
62-
bundle install
65+
bundle install --jobs 4 --retry 3
6366
continue-on-error: ${{ matrix.allowed_failure }}
6467

6568
- name: Prepare DB schema
66-
if: success() # only run if every prior step in the job succeeded
69+
if: (matrix.rails == '7.1.5.1') || steps.update.outcome == 'success'
6770
run: |
6871
rm -f spec/dummy/tmp/pids/server.pid
6972
bundle exec rake -f spec/dummy/Rakefile db:schema:load
7073
continue-on-error: ${{ matrix.allowed_failure }}
7174

7275
- name: Run RSpec
73-
if: success()
76+
if: (matrix.rails == '7.1.5.1') || steps.update.outcome == 'success'
7477
env:
7578
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
7679
run: |

0 commit comments

Comments
 (0)