Skip to content

Commit 20fbe92

Browse files
authored
Merge pull request #9 from rubyatscale/jms/lint-command
make it possible for CI workflow consumers to override linter command
2 parents 00d1e6d + 857c069 commit 20fbe92

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 5 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,21 +48,21 @@ 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
60-
needs: [run_tests, static_type_check, rubocop]
65+
needs: [run_tests, static_type_check, run_linter]
6166
if: ${{ failure() && github.ref == 'refs/heads/main' }}
6267
env:
6368
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

0 commit comments

Comments
 (0)