From c9c167a73d8b3b2f5c767fa8ff6ee341732ed2bc Mon Sep 17 00:00:00 2001 From: Phillip Aldridge Date: Wed, 8 Nov 2023 10:23:39 +1300 Subject: [PATCH] Test with a matrix of bundler versions --- .github/workflows/ci.yml | 19 ++++++------------- spec/warbler/bundler_spec.rb | 2 +- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f303df66..dabde647 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,8 +17,9 @@ jobs: strategy: matrix: - java-version: [8, 15] - ruby-version: [jruby-9.2.18.0, jruby-head] + java-version: [8, 11, 15] + ruby-version: [jruby-9.2.21.0, jruby-9.3.13.0, jruby-9.4.5.0, jruby-head] + bundler-version: [1.17.3, 2.4.21] task: ['', integration] fail-fast: false @@ -37,20 +38,12 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} - bundler: 1.17.3 - - name: Install fixed rubygems version for non-jruby-head - run: gem update --system 2.7.11 - if: ${{ matrix.ruby-version != 'jruby-head' }} - - # rubygems 2.7.11 is not supported on Ruby 3.1.0 (jruby-head). - # The oldest version supported by this ruby is 3.3.3. - - name: Install fixed rubygems version for jruby-head - run: gem update --system 3.3.3 && gem install bundler:1.17.3 - if: ${{ matrix.ruby-version == 'jruby-head' }} + - name: Install latest rubygems version with bundler ${{ matrix.bundler-version }} + run: gem update --system && gem install bundler:${{ matrix.bundler-version }} - name: Install dependencies - run: bundle _1.17.3_ install --jobs=3 --retry=3 + run: bundle _${{ matrix.bundler-version }}_ install --jobs=3 --retry=3 - name: Run tests run: bundle exec rake ${{ matrix.TASK }} diff --git a/spec/warbler/bundler_spec.rb b/spec/warbler/bundler_spec.rb index a1b6a69f..d95049f0 100644 --- a/spec/warbler/bundler_spec.rb +++ b/spec/warbler/bundler_spec.rb @@ -22,7 +22,7 @@ def use_config(&block) end def bundle_install(*args) - `cd #{Dir.pwd} && #{RUBY_EXE} -S bundle install #{args.join(' ')}` + `cd #{Dir.pwd} && #{RUBY_EXE} -S bundle _#{::Bundler::VERSION}_ install #{args.join(' ')}` end let(:config) { drbclient.config(@extra_config) }