Skip to content

Commit c28797a

Browse files
authored
ci: Use bundler-cache instead of manual Bundler install
* ci: Use bundler-cache instead of manual Bundler install Let ruby/setup-ruby manage Bundler and dependency installation. This avoids the manual Bundler install step and handles version differences more reliably. * ci: Use "latest" Bundler with Ruby "head" Prevents picking up of the Gemfile's v2.4.22 which is no longer compatible with Ruby 4. * ci: Pin old Bundler for Ruby 2.7 and release others This inverts the dependency strategy and within the CI matrix allows everything to use the latest except for Ruby 2.7 which is known to fail with later Bundler versions.
1 parent fa9dcf5 commit c28797a

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

.github/workflows/ruby.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ jobs:
2222
fail-fast: false
2323
matrix:
2424
ruby: ["2.7", "3.0", "3.1", "3.2", "3.3", "head"]
25+
include:
26+
- ruby: "2.7"
27+
bundler: "2.4.22"
2528
env:
2629
DEBUG: "true"
2730
steps:
@@ -32,9 +35,7 @@ jobs:
3235
uses: ruby/setup-ruby@v1
3336
with:
3437
ruby-version: ${{ matrix.ruby }}
35-
- name: Install Bundler
36-
run: gem install bundler -v $(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1 | awk '{print $1}')
37-
- name: Install dependencies
38-
run: bundle install
38+
bundler: ${{ matrix.bundler || 'default' }}
39+
bundler-cache: true
3940
- name: Run tests
4041
run: bundle exec rake

Gemfile.lock

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,3 @@ DEPENDENCIES
132132
simplecov
133133
vcr (~> 2.5)
134134
webmock
135-
136-
BUNDLED WITH
137-
2.4.22

0 commit comments

Comments
 (0)