Skip to content

Commit dbf25e3

Browse files
committed
Let setup-ruby choose appropriate version of bundler
instead of manually installing
1 parent 4c5d13a commit dbf25e3

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

.github/workflows/ruby.yml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ jobs:
77
name: Ruby specs
88
runs-on: ${{ matrix.os }}
99
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' || matrix.experimental }}
10-
env:
11-
BUNDLE_JOBS: 4
12-
BUNDLE_RETRY: 3
1310
strategy:
1411
fail-fast: false
1512
matrix:
@@ -34,25 +31,15 @@ jobs:
3431
gemfile: gemfiles/Gemfile-rails-edge
3532
experimental: true
3633

34+
env:
35+
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
3736
steps:
3837
- uses: actions/checkout@v2
39-
- uses: actions/cache@v2
40-
with:
41-
path: /home/runner/bundle
42-
key: bundle-use-ruby-${{ matrix.ruby }}-${{ matrix.gemfile }}-gems-${{ hashFiles(matrix.gemfile) }}-${{ hashFiles('**/*.gemspec') }}
43-
restore-keys: |
44-
bundle-use-ruby-${{ matrix.ruby }}-${{ matrix.gemfile }}-gems-
4538

4639
- uses: ruby/setup-ruby@v1
4740
with:
4841
ruby-version: ${{ matrix.ruby }}
49-
50-
- name: Bundle install
51-
run: |
52-
gem install bundler -v 2.1.4
53-
bundle config path /home/runner/bundle
54-
bundle config --global gemfile ${{ matrix.gemfile }}
55-
bundle install --jobs 4 --retry 3
42+
bundler-cache: true
5643

5744
- name: Ruby specs
5845
run: bundle exec rake test

0 commit comments

Comments
 (0)