-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (30 loc) · 930 Bytes
/
lint.yml
File metadata and controls
33 lines (30 loc) · 930 Bytes
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
name: Lint
on:
push:
branches:
- '**'
- '!dependabot/**'
pull_request:
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
jobs:
lint:
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5 # v3.3.0
# libyaml-dev is needed for psych, see https://github.com/ruby/setup-ruby/issues/409
- if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt install libyaml-dev
- name: Set up Ruby
uses: ruby/setup-ruby@master
with:
ruby-version: 3.3
bundler-cache: true
- name: Run rubocop
run: bundle exec rubocop
- name: Run herb linter
# npx should be available by default so we don't need `setup-node` action
# Don't lint erb files outside of lib as the current directory also includes vendor/bundle
run: npx @herb-tools/linter "lib/**/*.rhtml"