Skip to content

Commit

Permalink
Cache dependencies in CI (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
olimart authored Apr 28, 2020
1 parent 5931e54 commit 2a1806c
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,27 @@ jobs:
steps:
- uses: actions/checkout@master

- name: Sets up the Ruby version
- name: Set up the Ruby version
uses: actions/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}

- name: Sets up the environment
- name: Ruby gem cache
uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Set up the environment
run: |
gem install bundler
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Runs tests
run: rspec
run: bundle exec rspec

rubocop:
runs-on: ubuntu-latest
Expand All @@ -34,15 +43,24 @@ jobs:
steps:
- uses: actions/checkout@master

- name: Sets up the Ruby version
- name: Set up the Ruby version
uses: actions/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}

- name: Sets up the environment
- name: Ruby gem cache
uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Set up the environment
run: |
gem install bundler
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Runs Rubocop
run: rubocop
run: bundle exec rubocop

0 comments on commit 2a1806c

Please sign in to comment.