-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (44 loc) · 1.39 KB
/
checks.yml
File metadata and controls
46 lines (44 loc) · 1.39 KB
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
43
44
45
46
name: Checks
on:
pull_request:
merge_group:
push:
branches:
- main
jobs:
define-lints:
runs-on: ubuntu-24.04
outputs:
lints: ${{ steps.lints.outputs.value }}
steps:
- uses: actions/checkout@v4
- uses: sergeysova/jq-action@v2
id: lints
with:
cmd: jq '[.scripts | keys | .[] | select (contains("lint:")) | sub("^lint:"; "") ]' package.json --compact-output
lint:
runs-on: ubuntu-24.04
needs: define-lints
strategy:
fail-fast: false # otherwise one failed lint will prevent others from reporting additional errors
matrix:
linter: ${{ fromJSON(needs.define-lints.outputs.lints) }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 24
cache: 'pnpm'
# custom matchers HAVE to be named $linter-matcher.json with $linter beinb the part of the lint:$linter script in package.json
- name: 'Add custom matcher' # see https://github.com/actions/setup-node/issues/403
env:
linter: ${{ matrix.linter }}
run: echo "::add-matcher::.github/workflows/$linter-matcher.json"
- name: Install Node Dependencies
run: pnpm install
- name: Run all lints
env:
linter: ${{ matrix.linter }}
run: pnpm run lint:$linter