Skip to content

Commit 7a4610a

Browse files
committed
Extract linting CI config to another file
1 parent 6bb0ad5 commit 7a4610a

File tree

2 files changed

+27
-14
lines changed

2 files changed

+27
-14
lines changed

.github/workflows/lint.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Lint
2+
3+
on: [push, pull_request]
4+
5+
permissions: # added using https://github.com/step-security/secure-workflows
6+
contents: read
7+
8+
jobs:
9+
lint:
10+
strategy:
11+
fail-fast: false
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4 # v3.3.0
15+
# libyaml-dev is needed for psych, see https://github.com/ruby/setup-ruby/issues/409
16+
- if: ${{ matrix.os == 'ubuntu-latest' }}
17+
run: sudo apt install libyaml-dev
18+
- name: Set up Ruby
19+
uses: ruby/setup-ruby@master
20+
with:
21+
ruby-version: 3.3
22+
bundler-cache: true
23+
- name: Run rubocop
24+
run: bundle exec rubocop
25+
- name: Sanity check for the format_generated_files task
26+
run: bundle exec rake generate format_generated_files
27+

.github/workflows/test.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,3 @@ jobs:
4949
run: bundle exec rake rdoc
5050
- if: ${{ matrix.ruby == 'head' && startsWith(matrix.os, 'ubuntu') }}
5151
run: bundle exec rake install
52-
lint:
53-
runs-on: ubuntu-latest
54-
steps:
55-
- uses: actions/checkout@v4
56-
- name: Set up Ruby
57-
uses: ruby/setup-ruby@v1
58-
with:
59-
ruby-version: "3.3"
60-
bundler-cache: true
61-
- name: Run rubocop
62-
run: bundle exec rubocop
63-
# Just to make sure the format_generated_files task is working
64-
- name: Sanity check for the format_generated_files task
65-
run: bundle exec rake generate format_generated_files

0 commit comments

Comments
 (0)