Skip to content

Commit 3fd96bc

Browse files
authored
Merge pull request #3313 from nschonni/patch-1
ci: use built-in bundler caching for Rubocop job
2 parents 612c49e + f3f3415 commit 3fd96bc

File tree

1 file changed

+10
-23
lines changed

1 file changed

+10
-23
lines changed

.github/workflows/rubocop.yml

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,29 @@
11
name: Rubocop
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches-ignore:
6+
- 'dependabot/**'
7+
pull_request:
48

59
permissions:
610
contents: read
711

812
jobs:
913
rubocop:
1014
name: Rubocop
11-
runs-on: ${{ matrix.os }}
15+
runs-on: ubuntu-latest
1216
env:
1317
BUNDLE_JOBS: 4
1418
BUNDLE_RETRY: 3
15-
strategy:
16-
matrix:
17-
os: [ubuntu-latest]
18-
ruby: [
19-
2.7
20-
]
21-
2219
steps:
2320
- uses: actions/checkout@v3
24-
- uses: actions/cache@v3
25-
with:
26-
path: /home/runner/bundle
27-
key: bundle-use-ruby-gems-${{ hashFiles('**/Gemfile.lock') }}
28-
restore-keys: |
29-
bundle-use-ruby-gems-
3021

31-
- uses: ruby/setup-ruby@v1
22+
- name: Set up Ruby
23+
uses: ruby/setup-ruby@v1
3224
with:
33-
ruby-version: ${{ matrix.ruby }}
34-
35-
- name: Bundle install
36-
run: |
37-
gem install bundler -v 2.1.4
38-
bundle config path /home/runner/bundle
39-
bundle install
25+
ruby-version: 2.7
26+
bundler-cache: true
4027

4128
- name: Ruby linter
4229
run: bundle exec rubocop

0 commit comments

Comments
 (0)