File tree Expand file tree Collapse file tree 4 files changed +1748
-392
lines changed Expand file tree Collapse file tree 4 files changed +1748
-392
lines changed Original file line number Diff line number Diff line change 1
1
name : Lint
2
2
3
3
on :
4
- # Trigger the workflow on push or pull request,
5
- # but only for the main branch
6
- push :
7
- branches :
8
- - master
9
4
pull_request :
10
5
branches :
11
6
- master
12
7
8
+ concurrency :
9
+ group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
10
+ cancel-in-progress : true
11
+
12
+ permissions :
13
+ contents : read
14
+
13
15
jobs :
14
- run-linters :
15
- name : Run linters
16
+ lint :
17
+ name : Lint
18
+ timeout-minutes : 30
16
19
runs-on : ubuntu-latest
17
-
18
20
steps :
19
- - name : Check out Git repository
20
- uses : actions/checkout@v3
21
-
22
- - name : Set up Node.js
23
- uses : actions/setup-node@v1
24
- with :
25
- node-version : 12
26
-
27
- # ESLint and Prettier must be in `package.json`
28
- - name : Install Node.js dependencies
29
- run : npm ci
30
-
31
- - name : Run linters
32
- uses : wearerequired/lint-action@v2
21
+ - name : Checkout
22
+ uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
23
+ - name : Set up Node
24
+ uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
33
25
with :
34
- eslint : true
35
- prettier : true
26
+ node-version : ' 18'
27
+ cache : yarn
28
+ - name : Installation
29
+ run : yarn
30
+ # run: yarn install --immutable # Fails if yarn.lock is modified (unfortunately only works for Yarn 2, and --frozen-lockfile is not the same!)
31
+ - name : Check immutable yarn.lock
32
+ run : git diff --exit-code
33
+ - name : Lint
34
+ run : |
35
+ echo "::add-matcher::.github/workflows/cspell-problem-matcher.json"
36
+ yarn lint:ci
37
+ - name : Prettier Code
38
+ run : yarn format:diff
You can’t perform that action at this time.
0 commit comments