Skip to content

Commit

Permalink
Use bundler-cache option of ruby/setup-ruby
Browse files Browse the repository at this point in the history
ruby/setup-ruby has caching built in and is guaranteed to be correct.
  • Loading branch information
ekohl committed Dec 29, 2023
1 parent c91e50d commit 99e36bc
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,9 @@ jobs:
PHP_TZ: "US/Eastern"
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1 # actions/setup-ruby@v1
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ matrix.ruby }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ matrix.ruby }}-gems-
- name: Bundle install
run: |
gem list --silent -i bundler -v '~> 2' || gem install bundler -v '~> 2' --no-document
bundle config path vendor/bundle
bundle install --without development --jobs 4 --retry 3
bundler-cache: true
- name: Run tests
run: bundle exec rspec ./spec/*

0 comments on commit 99e36bc

Please sign in to comment.