Skip to content

Commit

Permalink
Merge pull request #1663 from tvdeyen/github-actions-caching
Browse files Browse the repository at this point in the history
Cache gems between CI runs
  • Loading branch information
tvdeyen authored Nov 1, 2019
2 parents cc21e84 + 41b011a commit 21ce555
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,22 @@ jobs:
if: matrix.database == 'mysql'
run: |
sudo apt-get install -yqq libmysqlclient-dev
- name: Install bundler
run: |
gem install bundler
- name: Cache Ruby Gems
id: cache
uses: actions/cache@preview
with:
path: vendor/bundle
key: ${{ runner.os }}-bundle-${{ matrix.ruby }}-${{ matrix.database }}-${{ hashFiles('**/Gemfile') }}
restore-keys: |
${{ runner.os }}-bundle-
- name: Install bundle
timeout-minutes: 10
if: steps.cache.outputs.cache-hit != 'true'
run: |
gem install bundler
bundle install --jobs 4 --retry 3
bundle install --jobs 4 --retry 3 --path vendor/bundle
- name: Prepare database
run: |
bundle exec rake alchemy:spec:prepare
Expand Down

0 comments on commit 21ce555

Please sign in to comment.