Skip to content

Commit f272905

Browse files
committed
Add CI workflow
1 parent 6ee7d03 commit f272905

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

.github/workflows/node.js.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
node-version: [22.x, 24.x]
20+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Use Node.js ${{ matrix.node-version }}
25+
- uses: pnpm/action-setup@0609f0983b7a228f052f81ef4c3d6510cae254ad
26+
with:
27+
version: 6.10.0
28+
- uses: actions/setup-node@v4
29+
with:
30+
node-version: ${{ matrix.node-version }}
31+
cache: 'pnpm'
32+
- run: pnpm install
33+
- run: pnpm lint:check
34+
- run: pnpm format:check
35+
- run: pnpm coverage:check
36+
- run: pnpm type:check
37+
- run: pnpm test

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,16 @@
1212
"coverage:check": "nyc check-coverage --lines 90 --branches 80 --statements 90",
1313
"prepare": "husky"
1414
},
15+
"engines": {
16+
"node": ">=22"
17+
},
18+
"packageManager": "pnpm@10.12.1",
1519
"lint-staged": {
1620
"**/*": [
1721
"pnpm lint",
1822
"pnpm format"
1923
]
2024
},
21-
"packageManager": "pnpm@10.12.1",
2225
"devDependencies": {
2326
"@eslint/js": "^9.31.0",
2427
"@types/chai": "^5.2.2",

0 commit comments

Comments
 (0)