Skip to content

Commit 509170e

Browse files
Merge pull request #15 from nicolastemciuc/nt--run-rubocop-in-a-different-job
Run `rubocop` in a different job
2 parents 83c19e3 + a8e9bd2 commit 509170e

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/workflows/build.yml

+15-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,21 @@ name: build
1010
on: push
1111

1212
jobs:
13+
lint:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Check out repository code
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Ruby
21+
uses: ruby/setup-ruby@v1
22+
with:
23+
ruby-version: '3.4'
24+
bundler-cache: true
25+
26+
- name: Lint code for consistent style
27+
run: bundle exec rubocop -f github
1328
test:
1429
runs-on: ubuntu-20.04
1530
strategy:
@@ -55,8 +70,5 @@ jobs:
5570
with:
5671
ruby-version: ${{ matrix.ruby-version }}
5772
bundler-cache: true
58-
- name: Run rubocop
59-
run: bundle exec rubocop
60-
if: ${{ matrix.ruby-version == '3.3' }}
6173
- name: Run tests
6274
run: bundle exec rspec

0 commit comments

Comments
 (0)