44 branches : [main, dev]
55
66env :
7- NODE_VERSION : ' 22.16.0'
8- PNPM_VERSION : ' 10.8.1'
7+ NODE_VERSION : " 22.16.0"
8+ PNPM_VERSION : " 10.8.1"
99
1010jobs :
11- setup :
12- name : 🏗️ Setup
13- runs-on : ubuntu-latest
14- timeout-minutes : 10
15- outputs :
16- pnpm_store_path : ${{ steps.pnpm-store.outputs.pnpm_store_path }}
17- steps :
18- - name : ⬇️ Checkout code
19- uses : actions/checkout@v4
20-
21- - name : ⚙️ Install pnpm
22- uses : pnpm/action-setup@v4
23- with :
24- version : ${{ env.PNPM_VERSION }}
25-
26- - name : ⚙️ Setup Node.js
27- uses : actions/setup-node@v4
28- with :
29- node-version : ${{ env.NODE_VERSION }}
30- cache : ' pnpm'
31-
32- - name : 📦 Get pnpm store path
33- id : pnpm-store
34- run : |
35- pnpm_store=$(pnpm store path)
36- mkdir -p $pnpm_store
37- echo "pnpm_store_path=$pnpm_store" >> $GITHUB_OUTPUT
38-
39- - name : 📦 Cache pnpm store
40- uses : actions/cache@v4
41- with :
42- path : ${{ steps.pnpm-store.outputs.pnpm_store_path }}
43- key : ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
44- restore-keys : |
45- ${{ runner.os }}-pnpm-
46-
47- - name : 📦 Upload workspace
48- uses : actions/upload-artifact@v4
49- with :
50- name : project-workspace
51- path : .
52-
5311 lint :
5412 name : 🧹 Lint
5513 runs-on : ubuntu-latest
56- timeout-minutes : 10
57- needs : setup
14+ timeout-minutes : 5
5815 steps :
59- - name : ⬇️ Download workspace
60- uses : actions/download-artifact@v4
61- with :
62- name : project-workspace
63- path : .
16+ - name : ⬇️ Checkout code
17+ uses : actions/checkout@v4
6418
6519 - name : ⚙️ Install pnpm
6620 uses : pnpm/action-setup@v4
@@ -71,33 +25,21 @@ jobs:
7125 uses : actions/setup-node@v4
7226 with :
7327 node-version : ${{ env.NODE_VERSION }}
74- cache : ' pnpm'
75-
76- - name : 📦 Restore pnpm cache
77- uses : actions/cache@v4
78- with :
79- path : ${{ needs.setup.outputs.pnpm_store_path }}
80- key : ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
81- restore-keys : |
82- ${{ runner.os }}-pnpm-
28+ cache : " pnpm"
8329
8430 - name : 🥁 Install dependencies
85- run : pnpm install --frozen-lockfile --store-dir ${{ needs.setup.outputs.pnpm_store_path }}
31+ run : pnpm install --frozen-lockfile
8632
8733 - name : 🔍 Run lint
8834 run : pnpm lint
8935
9036 typecheck :
9137 name : 🔍 Type Check
9238 runs-on : ubuntu-latest
93- timeout-minutes : 10
94- needs : setup
39+ timeout-minutes : 5
9540 steps :
96- - name : ⬇️ Download workspace
97- uses : actions/download-artifact@v4
98- with :
99- name : project-workspace
100- path : .
41+ - name : ⬇️ Checkout code
42+ uses : actions/checkout@v4
10143
10244 - name : ⚙️ Install pnpm
10345 uses : pnpm/action-setup@v4
@@ -108,18 +50,10 @@ jobs:
10850 uses : actions/setup-node@v4
10951 with :
11052 node-version : ${{ env.NODE_VERSION }}
111- cache : ' pnpm'
112-
113- - name : 📦 Restore pnpm cache
114- uses : actions/cache@v4
115- with :
116- path : ${{ needs.setup.outputs.pnpm_store_path }}
117- key : ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
118- restore-keys : |
119- ${{ runner.os }}-pnpm-
53+ cache : " pnpm"
12054
12155 - name : 🥁 Install dependencies
122- run : pnpm install --frozen-lockfile --store-dir ${{ needs.setup.outputs.pnpm_store_path }}
56+ run : pnpm install --frozen-lockfile
12357
12458 - name : 🔍 Run type check
12559 run : pnpm typecheck
@@ -128,13 +62,9 @@ jobs:
12862 name : 🧪 Test
12963 runs-on : ubuntu-latest
13064 timeout-minutes : 10
131- needs : setup
13265 steps :
133- - name : ⬇️ Download workspace
134- uses : actions/download-artifact@v4
135- with :
136- name : project-workspace
137- path : .
66+ - name : ⬇️ Checkout code
67+ uses : actions/checkout@v4
13868
13969 - name : ⚙️ Install pnpm
14070 uses : pnpm/action-setup@v4
@@ -145,18 +75,10 @@ jobs:
14575 uses : actions/setup-node@v4
14676 with :
14777 node-version : ${{ env.NODE_VERSION }}
148- cache : ' pnpm'
149-
150- - name : 📦 Restore pnpm cache
151- uses : actions/cache@v4
152- with :
153- path : ${{ needs.setup.outputs.pnpm_store_path }}
154- key : ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
155- restore-keys : |
156- ${{ runner.os }}-pnpm-
78+ cache : " pnpm"
15779
15880 - name : 🥁 Install dependencies
159- run : pnpm install --frozen-lockfile --store-dir ${{ needs.setup.outputs.pnpm_store_path }}
81+ run : pnpm install --frozen-lockfile
16082
16183 - name : 🔍 Run tests
16284 run : pnpm test
0 commit comments