Skip to content

Commit 0aa3f0d

Browse files
committed
feat: add GitHub CI workflow with multi-version Node.js and cross-platform matrix
1 parent b2a0a09 commit 0aa3f0d

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
build-and-test:
11+
name: Node ${{ matrix.node-version }} / ${{ matrix.os }}
12+
runs-on: ${{ matrix.os }}
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
os:
18+
- ubuntu-latest
19+
- windows-latest
20+
- macos-latest
21+
node-version:
22+
- "18"
23+
- "20"
24+
- "22"
25+
- "24"
26+
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
31+
- name: Setup Node.js ${{ matrix.node-version }}
32+
uses: actions/setup-node@v4
33+
with:
34+
node-version: ${{ matrix.node-version }}
35+
cache: npm
36+
37+
- name: Install dependencies
38+
run: npm ci
39+
40+
- name: TypeCheck + Lint + Format Check
41+
run: npm run check
42+
43+
- name: Bundle
44+
run: npm run bundle
45+
46+
- name: Test
47+
run: npm test

0 commit comments

Comments
 (0)