Skip to content

Commit 23259b5

Browse files
committed
ci: update workflow to include matrix
1 parent eed5bfb commit 23259b5

File tree

1 file changed

+41
-14
lines changed

1 file changed

+41
-14
lines changed

.github/workflows/ci.yml

+41-14
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,65 @@ on:
44
push:
55
branches:
66
- main
7+
78
pull_request:
89
branches:
910
- main
1011

1112
jobs:
12-
build:
13+
lint:
1314
runs-on: ubuntu-latest
14-
strategy:
15-
matrix:
16-
node-version: [18, 20]
1715
steps:
18-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
16+
- uses: actions/checkout@v4.1.7
1917

20-
- name: Setup pnpm
18+
- name: Install pnpm
2119
uses: pnpm/action-setup@v4
2220

23-
- name: Setup node
24-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
21+
- name: Set node
22+
uses: actions/setup-node@v4.0.2
2523
with:
26-
node-version: ${{ matrix.node-version}}
24+
node-version: lts/*
2725

28-
- name: Install dependencies
29-
run: pnpm install
26+
- name: Install
27+
run: pnpm install --frozen-lockfile
3028

3129
- name: Build
3230
run: pnpm build
3331

3432
- name: Lint
3533
run: pnpm lint
3634

37-
- name: Test
38-
run: pnpm test
39-
4035
- name: Typecheck
4136
run: pnpm typecheck
37+
38+
test:
39+
runs-on: ${{ matrix.os }}
40+
41+
strategy:
42+
matrix:
43+
node: [20, 18]
44+
os:
45+
- ubuntu-latest
46+
- macos-latest
47+
- windows-latest
48+
fail-fast: false
49+
50+
steps:
51+
- uses: actions/checkout@v4.1.7
52+
53+
- name: Install pnpm
54+
uses: pnpm/action-setup@v4
55+
56+
- name: Set node ${{ matrix.node }}
57+
uses: actions/setup-node@v4.0.2
58+
with:
59+
node-version: ${{ matrix.node }}
60+
61+
- name: Install
62+
run: pnpm install --frozen-lockfile
63+
64+
- name: Build
65+
run: pnpm build
66+
67+
- name: Test
68+
run: pnpm test

0 commit comments

Comments
 (0)