Skip to content

Commit

Permalink
ci: use built-in bundler caching for Rubocop job
Browse files Browse the repository at this point in the history
  • Loading branch information
nschonni committed Apr 12, 2023
1 parent 632fb85 commit f3f3415
Showing 1 changed file with 10 additions and 23 deletions.
33 changes: 10 additions & 23 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,29 @@
name: Rubocop

on: [push, pull_request]
on:
push:
branches-ignore:
- 'dependabot/**'
pull_request:

permissions:
contents: read

jobs:
rubocop:
name: Rubocop
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
env:
BUNDLE_JOBS: 4
BUNDLE_RETRY: 3
strategy:
matrix:
os: [ubuntu-latest]
ruby: [
2.7
]

steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: /home/runner/bundle
key: bundle-use-ruby-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
bundle-use-ruby-gems-

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

- name: Bundle install
run: |
gem install bundler -v 2.1.4
bundle config path /home/runner/bundle
bundle install
ruby-version: 2.7
bundler-cache: true

- name: Ruby linter
run: bundle exec rubocop

0 comments on commit f3f3415

Please sign in to comment.