forked from consuldemocracy/consuldemocracy
-
Notifications
You must be signed in to change notification settings - Fork 17
42 lines (40 loc) · 1.14 KB
/
linters.yml
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
34
35
36
37
38
39
40
41
42
name: linters
on: [pull_request]
permissions:
contents: read
jobs:
linters:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: RuboCop
run: bundle exec rubocop --fail-level convention --display-only-fail-level-offenses -f github
- name: ERB Lint
run: bundle exec erblint .
- name: ESLint
run: npx eslint . --quiet
- name: Stylelint
run: npx stylelint app/assets/stylesheets
- name: Markdownlint
run: bundle exec mdl *.md docs/
name: ${{ matrix.name }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- run: |
git fetch --no-tags --prune origin +refs/heads/*:refs/remotes/origin/*
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Setup NPM
uses: actions/setup-node@v4
with:
cache: "npm"
node-version-file: ".node-version"
- name: Install node packages
run: npm clean-install
- name: ${{ matrix.name }}
run: ${{ matrix.run }}