Skip to content

Commit 6e23913

Browse files
committed
ci: update github ci action
1 parent d7787ea commit 6e23913

File tree

2 files changed

+102
-131
lines changed

2 files changed

+102
-131
lines changed

.github/workflows/ci.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: [main, next]
9+
pull_request:
10+
branches: [main, next]
11+
12+
jobs:
13+
check:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
node-version: [18.x, 20.x]
18+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Install pnpm
25+
uses: pnpm/[email protected]
26+
with:
27+
version: 9.7.0
28+
29+
- name: Use Node.js ${{ matrix.node-version }}
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: ${{ matrix.node-version }}
33+
cache: 'pnpm'
34+
35+
- name: Install dependencies
36+
run: pnpm install --frozen-lockfile
37+
38+
- name: Run prettier lint
39+
run: pnpm lint
40+
41+
- name: Run tsc check
42+
run: pnpm check-types
43+
44+
45+
test:
46+
runs-on: ubuntu-latest
47+
strategy:
48+
matrix:
49+
node-version: [18.x, 20.x]
50+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
51+
52+
steps:
53+
- name: Checkout
54+
uses: actions/checkout@v4
55+
56+
- name: Install pnpm
57+
uses: pnpm/[email protected]
58+
with:
59+
version: 9.7.0
60+
61+
- name: Use Node.js ${{ matrix.node-version }}
62+
uses: actions/setup-node@v4
63+
with:
64+
node-version: ${{ matrix.node-version }}
65+
cache: 'pnpm'
66+
67+
- name: Install dependencies
68+
run: pnpm install --frozen-lockfile
69+
70+
- name: Run Units Test
71+
run: pnpm test
72+
73+
74+
build:
75+
runs-on: ubuntu-latest
76+
strategy:
77+
matrix:
78+
node-version: [18.x, 20.x]
79+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
80+
81+
steps:
82+
- name: Checkout
83+
uses: actions/checkout@v4
84+
85+
- name: Install pnpm
86+
uses: pnpm/[email protected]
87+
with:
88+
version: 9.7.0
89+
90+
- name: Use Node.js ${{ matrix.node-version }}
91+
uses: actions/setup-node@v4
92+
with:
93+
node-version: ${{ matrix.node-version }}
94+
cache: 'pnpm'
95+
96+
- name: Install dependencies
97+
run: pnpm install --frozen-lockfile
98+
99+
- name: Run Build
100+
run: pnpm build
101+
102+

.github/workflows/nodejs.yml

Lines changed: 0 additions & 131 deletions
This file was deleted.

0 commit comments

Comments
 (0)