Skip to content

Commit d986181

Browse files
committed
Add CI workflow
1 parent f272905 commit d986181

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

.github/workflows/node.js.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ jobs:
3030
node-version: ${{ matrix.node-version }}
3131
cache: 'pnpm'
3232
- run: pnpm install
33-
- run: pnpm lint:check
34-
- run: pnpm format:check
35-
- run: pnpm coverage:check
36-
- run: pnpm type:check
33+
- run: pnpm ci:lint
34+
- run: pnpm ci:format
35+
- run: pnpm ci:coverage
3736
- run: pnpm test

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
"type": "module",
66
"scripts": {
77
"clean": "rm -rf .nyc_output coverage dist",
8-
"test": "nyc mocha 'src/**/*.test.ts' --require=tsx",
8+
"test": "nyc --reporter html --reporter text mocha 'src/**/*.test.ts' --require=tsx",
99
"lint": "eslint --fix 'src/**/*.ts'",
1010
"format": "prettier --write --ignore-unknown .",
11-
"coverage": "nyc report --reporter html && open coverage/index.html",
12-
"coverage:check": "nyc check-coverage --lines 90 --branches 80 --statements 90",
13-
"prepare": "husky"
11+
"coverage": "open coverage/index.html",
12+
"prepare": "husky",
13+
"ci:lint": "eslint 'src/**/*.ts'",
14+
"ci:format": "prettier --check --ignore-unknown .",
15+
"ci:coverage": "nyc check-coverage --lines 90 --branches 80 --statements 90"
1416
},
1517
"engines": {
1618
"node": ">=22"

0 commit comments

Comments
 (0)