File tree 2 files changed +53
-2
lines changed
2 files changed +53
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ # configure concurrency: cancel pending and in-progress workflow runs if a new commit to the same branch is pushed (`github.head_ref` is the source branch of PRs, `github.ref_name` is the branch name of non-PR events)
4
+ concurrency :
5
+ group : ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
6
+ cancel-in-progress : true
7
+
8
+ on :
9
+ push :
10
+ branches :
11
+ - main
12
+ pull_request :
13
+ branches :
14
+ - main
15
+ types :
16
+ - opened # new PR was created
17
+ - synchronize # the last commit of the `head_ref` (= source branch) changed, e.g. a new commit was pushed or the source branch was rebased
18
+ - ready_for_review # the PR switched from draft to non-draft
19
+ - reopened # PR had been closed and got reopened
20
+
21
+ jobs :
22
+ check :
23
+ name : Checks (typechecking, linting, formatting)
24
+ # run only if triggered by push on a branch or by a PR event for a PR which is not a draft
25
+ if : ${{ !github.event.pull_request || github.event.pull_request.draft == false }}
26
+ runs-on : ubuntu-24.04
27
+ steps :
28
+ - uses : actions/checkout@v4
29
+
30
+ - name : Install Node.js
31
+ uses : actions/setup-node@v4
32
+ with :
33
+ node-version-file : " .nvmrc"
34
+ cache : npm
35
+
36
+ - name : Install dependencies
37
+ run : |
38
+ npm ci
39
+
40
+ - name : Typecheck everything (tsc)
41
+ run : |
42
+ npm run build:types
43
+
44
+ - name : Lint everything (eslint)
45
+ run : |
46
+ npm run lint
47
+
48
+ - name : Check formatting of everything (prettier)
49
+ run : |
50
+ npm run fmt
Original file line number Diff line number Diff line change 12
12
"build:preview" : " vite preview" ,
13
13
"build:readme" : " node tools/update-readme.js" ,
14
14
"start" : " vite" ,
15
+ "build:types" : " tsc" ,
15
16
"lint" : " npm-run-all --parallel lint:js" ,
16
17
"lint:fix" : " npm-run-all --parallel lint:fix:*" ,
17
- "lint:js" : " eslint ." ,
18
- "lint:fix:js" : " eslint . --fix" ,
18
+ "lint:js" : " eslint --max-warnings 0 ." ,
19
+ "lint:fix:js" : " eslint --max-warnings 0 . --fix" ,
19
20
"fmt" : " prettier --check ." ,
20
21
"fmt:fix" : " prettier --write ."
21
22
},
You can’t perform that action at this time.
0 commit comments