-
Notifications
You must be signed in to change notification settings - Fork 178
51 lines (46 loc) · 1.1 KB
/
rubocop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Rubocop
on:
push:
paths:
- "*.lic"
- "*.rb"
pull_request:
paths:
- "*.lic"
- "*.rb"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
rubocop:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ['3.3']
name: Run Rubocop on Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
with:
files: |
*.lic
*.rb
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Install ruby gem dependencies with bundler
run: |
gem install bundler
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- run: bundle install
- name: Rubocop
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
bundle exec rubocop ${file}
done