Skip to content

Commit 0100a33

Browse files
committed
ci: add ci workflow
1 parent 74dfea9 commit 0100a33

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/build-test.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build and test
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
branches: [main]
7+
8+
jobs:
9+
build_test:
10+
strategy:
11+
matrix:
12+
platform: [ubuntu-latest, macos-latest, windows-latest]
13+
node-version: ['22']
14+
15+
name: ${{ matrix.platform }} / Node.js v${{ matrix.node-version }}
16+
runs-on: ${{ matrix.platform }}
17+
steps:
18+
- run: git config --global core.autocrlf false # Preserve line endings
19+
- uses: actions/checkout@v4
20+
- name: Setup Node.js v${{ matrix.node-version }}
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
- name: Install dependencies
25+
run: npm ci
26+
- name: Build packages
27+
run: npm run build
28+
- name: Lint packages
29+
run: npm run lint
30+
- name: Test packages
31+
run: npm test --if-present
32+
33+
build_test_all:
34+
if: always()
35+
runs-on: ubuntu-latest
36+
needs: build_test
37+
steps:
38+
- name: Check build matrix status
39+
if: ${{ needs.build_test.result != 'success' }}
40+
run: exit 1

0 commit comments

Comments
 (0)