Skip to content

Commit 63e96fb

Browse files
committed
refactor(ci): split CI into check, test and build jobs
1 parent a68c142 commit 63e96fb

File tree

1 file changed

+42
-2
lines changed

1 file changed

+42
-2
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,28 @@ env:
1616
PLUNK_SECRET_KEY: ${{ secrets.PLUNK_SECRET_KEY }}
1717

1818
jobs:
19-
build-and-test:
19+
check:
20+
name: "Svelte Check"
21+
runs-on: ubuntu-latest
22+
strategy:
23+
matrix:
24+
node-version: [20.x, 22.x, "24.x"]
25+
steps:
26+
- uses: actions/checkout@v4
27+
- name: Install pnpm
28+
uses: pnpm/action-setup@v4
29+
with:
30+
version: latest
31+
- name: Use Node.js ${{ matrix.node-version }}
32+
uses: actions/setup-node@v4
33+
with:
34+
node-version: ${{ matrix.node-version }}
35+
cache: "pnpm"
36+
- run: pnpm install --frozen-lockfile
37+
- run: pnpm run check
38+
39+
test:
40+
needs: check
2041
runs-on: ubuntu-latest
2142
strategy:
2243
matrix:
@@ -33,5 +54,24 @@ jobs:
3354
node-version: ${{ matrix.node-version }}
3455
cache: "pnpm"
3556
- run: pnpm install --frozen-lockfile
36-
- run: pnpm run build
3757
- run: pnpm run test
58+
59+
build:
60+
needs: test
61+
runs-on: ubuntu-latest
62+
strategy:
63+
matrix:
64+
node-version: [20.x, 22.x, "24.x"]
65+
steps:
66+
- uses: actions/checkout@v4
67+
- name: Install pnpm
68+
uses: pnpm/action-setup@v4
69+
with:
70+
version: latest
71+
- name: Use Node.js ${{ matrix.node-version }}
72+
uses: actions/setup-node@v4
73+
with:
74+
node-version: ${{ matrix.node-version }}
75+
cache: "pnpm"
76+
- run: pnpm install --frozen-lockfile
77+
- run: pnpm run build

0 commit comments

Comments
 (0)