Skip to content

Commit 5169b47

Browse files
committed
make it possible for CI workflow consumers to override linter command
1 parent 00d1e6d commit 5169b47

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ on:
88
required: false
99
type: string
1010
default: 'bundle exec rspec'
11+
linter-command:
12+
description: 'The command to run the linter'
13+
required: false
14+
type: string
15+
default: 'bundle exec rubocop'
1116
jobs:
1217
run_tests:
1318
runs-on: ubuntu-latest
@@ -43,18 +48,18 @@ jobs:
4348
ruby-version: 3.3
4449
- name: Run static type checks
4550
run: bundle exec srb tc
46-
rubocop:
51+
run_linter:
4752
runs-on: ubuntu-latest
48-
name: Rubocop
53+
name: "Linter"
4954
steps:
5055
- uses: actions/checkout@v4
5156
- name: Set up Ruby
5257
uses: ruby/setup-ruby@v1
5358
with:
5459
bundler-cache: true
5560
ruby-version: 3.3
56-
- name: Run style checks
57-
run: bundle exec rubocop
61+
- name: Run linter
62+
run: ${{ inputs.linter-command }}
5863
notify_on_failure:
5964
runs-on: ubuntu-latest
6065
needs: [run_tests, static_type_check, rubocop]

0 commit comments

Comments
 (0)