Skip to content

Commit

Permalink
[TASK] Add bundler caching to the CI (#166)
Browse files Browse the repository at this point in the history
Fixes #93
  • Loading branch information
oliverklee authored May 31, 2024
1 parent 40adea1 commit d2c49d2
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,41 +18,32 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.2'
bundler-cache: true
- name: 'Check the environment'
run: |
ruby --version
gem --version
- name: 'Install bundler'
run: |
gem install bundler
bundle --version
- name: 'Install gems'
run: 'bundle install --jobs 4 --retry 3'
- name: 'Run RuboCop'
run: 'bundle exec rake rubocop'
test:
name: "Tests: Ruby ${{ matrix.ruby }} / Rails ${{ matrix.rails }}"
runs-on: ubuntu-22.04
env:
BUNDLE_GEMFILE: "${{ github.workspace }}/gemfiles/rails-${{ matrix.rails }}.gemfile"
steps:
- uses: actions/checkout@v4
- name: 'Set up Ruby'
uses: ruby/setup-ruby@v1
with:
ruby-version: '${{ matrix.ruby }}'
bundler-cache: true
- name: 'Check the environment'
run: |
ruby --version
gem --version
- name: 'Install bundler'
run: |
gem install bundler
bundle --version
- name: 'Install gems'
env:
MATRIX_RAILS_VERSION: ${{ matrix.rails }}
run: |
export BUNDLE_GEMFILE="${GITHUB_WORKSPACE}/gemfiles/rails-${MATRIX_RAILS_VERSION}.gemfile"
bundle install --jobs 4 --retry 3
echo $BUNDLE_GEMFILE
- name: 'Run the tests'
run: 'bundle exec rspec spec/'
strategy:
Expand Down

0 comments on commit d2c49d2

Please sign in to comment.