From 51418aa71797e836f7e463d61f31d71e44b2e9ba Mon Sep 17 00:00:00 2001 From: Matijs van Zuijlen Date: Fri, 13 Oct 2023 09:31:19 +0200 Subject: [PATCH] Use ruby-setup's native caching This action supports caching with different gemfiles out of the box. See https://github.com/ruby/setup-ruby#matrix-of-gemfiles. --- .github/workflows/ruby.yml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 3cbed62c4..d6c736f35 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -40,19 +40,7 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - - uses: actions/cache@v3 - with: - # NOTE: Bundler expands the path relative to the gemfile, not the - # current directory. - path: ./gemfiles/vendor/bundle - key: bundled-gems-${{ runner.os }}-ruby-${{ matrix.ruby }}-${{ matrix.appraisal }}-${{ hashFiles(env.BUNDLE_GEMFILE, '*.gemspec') }} - restore-keys: | - bundled-gems-${{ runner.os }}-ruby-${{ matrix.ruby }}-${{ matrix.appraisal }}- - bundled-gems-${{ runner.os }}-ruby-${{ matrix.ruby }}- - - name: Install gems - run: | - bundle config path vendor/bundle - bundle install --jobs 4 + bundler-cache: true - name: Run specs run: bundle exec rake spec - name: Run cukes