-
-
Notifications
You must be signed in to change notification settings - Fork 9
47 lines (38 loc) · 1.02 KB
/
unit-test.yml
File metadata and controls
47 lines (38 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Unit Test
on:
push:
branches: [main]
pull_request:
branches: [main]
# cancel in-progress runs on new commits to same PR (gitub.event.number)
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-slim
permissions: {}
steps:
- name: Setup JS
uses: sxzz/workflows/setup-js@69098296b6f6083ed99f38e2040f2a7238580e27 # v1.4.0
- name: Build
run: pnpm build
- name: Type Check
run: pnpm run typecheck
test:
strategy:
matrix:
os: [ubuntu-slim, windows-latest, macos-latest]
node-version: [22, lts/*]
fail-fast: false
runs-on: ${{ matrix.os }}
permissions: {}
steps:
- name: Setup JS
uses: sxzz/workflows/setup-js@69098296b6f6083ed99f38e2040f2a7238580e27 # v1.4.0
with:
node-version: ${{ matrix.node-version }}
- name: Build
run: pnpm build
- name: Unit Test
run: pnpm run test