Skip to content

Commit

Permalink
Let setup-ruby choose appropriate version of bundler
Browse files Browse the repository at this point in the history
instead of manually installing
  • Loading branch information
amatsuda committed Jan 20, 2023
1 parent 4c5d13a commit dbf25e3
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions .github/workflows/ruby.yml
Expand Up @@ -7,9 +7,6 @@ jobs:
name: Ruby specs
runs-on: ${{ matrix.os }}
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' || matrix.experimental }}
env:
BUNDLE_JOBS: 4
BUNDLE_RETRY: 3
strategy:
fail-fast: false
matrix:
Expand All @@ -34,25 +31,15 @@ jobs:
gemfile: gemfiles/Gemfile-rails-edge
experimental: true

env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: /home/runner/bundle
key: bundle-use-ruby-${{ matrix.ruby }}-${{ matrix.gemfile }}-gems-${{ hashFiles(matrix.gemfile) }}-${{ hashFiles('**/*.gemspec') }}
restore-keys: |
bundle-use-ruby-${{ matrix.ruby }}-${{ matrix.gemfile }}-gems-

- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}

- name: Bundle install
run: |
gem install bundler -v 2.1.4
bundle config path /home/runner/bundle
bundle config --global gemfile ${{ matrix.gemfile }}
bundle install --jobs 4 --retry 3
bundler-cache: true

- name: Ruby specs
run: bundle exec rake test

0 comments on commit dbf25e3

Please sign in to comment.