Skip to content

Commit b538172

Browse files
committed
Use bundler-cache to bundle install and cache gems
The setup-ruby action makes it trivial to bundle install gems from a cache and update the cache when the run completes. When using `bundler-cache`, we can't use `bundle config` commands, but we can achieve the same effect specifying BUNDLE_SET as an env variable. See https://github.com/ruby/setup-ruby for details (cherry picked from commit 86820ee)
1 parent 19caf04 commit b538172

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

.github/workflows/rspec_tests.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
- {os: windows-2019, ruby: '3.0'}
2828

2929
runs-on: ${{ matrix.cfg.os }}
30+
env:
31+
BUNDLE_SET: "without packaging documentation"
3032
steps:
3133
- name: Checkout current PR
3234
uses: actions/checkout@v4
@@ -35,12 +37,7 @@ jobs:
3537
uses: ruby/setup-ruby@v1
3638
with:
3739
ruby-version: ${{ matrix.cfg.ruby }}
38-
39-
- name: Update rubygems and install gems
40-
run: |
41-
gem update --system 3.3.26 --silent --no-document
42-
bundle config set without packaging documentation
43-
bundle install --jobs 4 --retry 3
40+
bundler-cache: true
4441

4542
- name: Run tests on Windows
4643
if: runner.os == 'Windows'

0 commit comments

Comments
 (0)