Skip to content

Commit 4da2bb3

Browse files
committed
optimize CI
1 parent 65c4e47 commit 4da2bb3

1 file changed

Lines changed: 48 additions & 15 deletions

File tree

.github/workflows/ci.yml

Lines changed: 48 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,14 @@ name: CI
22

33
on:
44
push:
5-
branches: [main, master]
5+
branches: [main]
66
pull_request:
7-
branches: [main, master]
7+
branches: [main]
88

99
jobs:
10-
ci:
11-
name: Typecheck / Lint / Format / Test
10+
quality:
11+
name: Code Quality (Lint, Format, Typecheck)
1212
runs-on: ubuntu-latest
13-
env:
14-
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
15-
1613
steps:
1714
- uses: actions/checkout@v4
1815

@@ -22,24 +19,60 @@ jobs:
2219

2320
- uses: actions/setup-node@v4
2421
with:
25-
node-version: '22'
26-
cache: pnpm
22+
node-version: "22"
23+
cache: "pnpm"
2724

2825
- name: Install dependencies
2926
run: pnpm install --frozen-lockfile
3027

31-
- name: Typecheck
32-
run: pnpm typecheck
28+
- name: Format check
29+
run: pnpm format:check
3330

3431
- name: Lint
3532
run: pnpm lint
3633

37-
- name: Format check
38-
run: pnpm format:check
34+
- name: Typecheck
35+
run: pnpm typecheck
3936

40-
- name: Build
41-
run: pnpm build
37+
test:
38+
name: Test Coverage
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- uses: pnpm/action-setup@v4
44+
with:
45+
version: 9
46+
47+
- uses: actions/setup-node@v4
48+
with:
49+
node-version: "22"
50+
cache: "pnpm"
51+
52+
- name: Install dependencies
53+
run: pnpm install --frozen-lockfile
4254

4355
- name: Test Coverage Gate
4456
run: pnpm test:coverage
4557

58+
build:
59+
name: Build
60+
runs-on: ubuntu-latest
61+
needs: [quality, test]
62+
steps:
63+
- uses: actions/checkout@v4
64+
65+
- uses: pnpm/action-setup@v4
66+
with:
67+
version: 9
68+
69+
- uses: actions/setup-node@v4
70+
with:
71+
node-version: "22"
72+
cache: "pnpm"
73+
74+
- name: Install dependencies
75+
run: pnpm install --frozen-lockfile
76+
77+
- name: Build
78+
run: pnpm build

0 commit comments

Comments
 (0)