Skip to content

Commit 8b16a90

Browse files
committed
ci: setup CI workflow
1 parent 57f491e commit 8b16a90

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
lint:
9+
name: Lint
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: pnpm/action-setup@v3
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: "20"
17+
cache: "pnpm"
18+
- run: pnpm install
19+
- run: pnpm build
20+
- run: pnpm lint
21+
22+
test:
23+
name: Test Node.js ${{ matrix.os }} ${{ matrix.node-version }}
24+
runs-on: ${{ matrix.os }}
25+
strategy:
26+
matrix:
27+
node-version: [18.x, 20.x, 22.x]
28+
os: [ubuntu-latest, windows-latest, macos-latest]
29+
steps:
30+
- uses: actions/checkout@v4
31+
- uses: pnpm/action-setup@v3
32+
- uses: actions/setup-node@v4
33+
with:
34+
node-version: ${{ matrix.node-version }}
35+
cache: "pnpm"
36+
- run: pnpm install
37+
- run: pnpm build
38+
- run: pnpm test
39+
40+
actions-timeline:
41+
needs: [lint, test]
42+
runs-on: ubuntu-latest
43+
if: ${{ !cancelled() }}
44+
steps:
45+
- uses: Kesin11/actions-timeline@da70beff098ff89b15d279e8bf2f60519a8dadd7 # v2

0 commit comments

Comments
 (0)