11name : Monkey CI
22
33env :
4+ PNPM_VERSION : " 9.6.0"
45 NODE_VERSION : " 20.16.0"
56 RECAPTCHA_SITE_KEY : " 6Lc-V8McAAAAAJ7s6LGNe7MBZnRiwbsbiWts87aj"
67
@@ -69,34 +70,44 @@ jobs:
6970 if : needs.pre-ci.outputs.should-build-be == 'true' || needs.pre-ci.outputs.should-build-fe == 'true' || needs.pre-ci.outputs.should-build-pkg == 'true' || needs.pre-ci.outputs.assets-json == 'true'
7071 steps :
7172
72- - name : Checkout package -lock
73+ - name : Checkout pnpm -lock
7374 uses : actions/checkout@v4
7475 with :
7576 sparse-checkout : |
76- package-lock.json
77+ pnpm-lock.yaml
78+
79+ - name : Setup pnpm
80+ uses : pnpm/action-setup@v4
81+ with :
82+ version : ${{ env.PNPM_VERSION }}
83+
84+ - name : Get pnpm store directory
85+ shell : bash
86+ run : |
87+ echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
7788
7889 - name : Cache node modules
79- id : cache-npm
90+ id : cache-pnpm
8091 uses : actions/cache@v4
8192 env :
8293 cache-name : node-modules
8394 with :
84- path : ~/.npm
85- key : ${{ runner.os }}-${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-${{ hashFiles('package -lock.json ') }}
95+ path : ${{ env.STORE_PATH }}
96+ key : ${{ runner.os }}-${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-${{ hashFiles('pnpm -lock.yaml ') }}
8697
87- - if : ${{ steps.cache-npm .outputs.cache-hit != 'true' }}
98+ - if : ${{ steps.cache-pnpm .outputs.cache-hit != 'true' }}
8899 name : Full checkout
89100 uses : actions/checkout@v4
90101
91- - if : ${{ steps.cache-npm .outputs.cache-hit != 'true' }}
102+ - if : ${{ steps.cache-pnpm .outputs.cache-hit != 'true' }}
92103 name : Set up Node.js
93104 uses : actions/setup-node@v4
94105 with :
95106 node-version : ${{ env.NODE_VERSION }}
96107
97- - if : ${{ steps.cache-npm .outputs.cache-hit != 'true' }}
108+ - if : ${{ steps.cache-pnpm .outputs.cache-hit != 'true' }}
98109 name : Install dependencies
99- run : npm install --prefer-offline --no-audit
110+ run : pnpm install
100111
101112 check-pretty :
102113 name : check-pretty
@@ -105,22 +116,33 @@ jobs:
105116 if : needs.pre-ci.outputs.should-build-be == 'true' || needs.pre-ci.outputs.should-build-fe == 'true' || needs.pre-ci.outputs.should-build-pkg == 'true' || needs.pre-ci.outputs.assets-json == 'true'
106117 steps :
107118 - uses : actions/checkout@v4
119+
108120 - name : Set up Node.js
109121 uses : actions/setup-node@v4
110122 with :
111123 node-version : ${{ env.NODE_VERSION }}
112124
125+ - name : Setup pnpm
126+ uses : pnpm/action-setup@v4
127+ with :
128+ version : ${{ env.PNPM_VERSION }}
129+
130+ - name : Get pnpm store directory
131+ shell : bash
132+ run : |
133+ echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
134+
113135 - name : Cache node modules
114- id : cache-npm
136+ id : cache-pnpm
115137 uses : actions/cache@v4
116138 env :
117139 cache-name : node-modules
118140 with :
119- path : ~/.npm
120- key : ${{ runner.os }}-${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-${{ hashFiles('package -lock.json ') }}
141+ path : ${{ env.STORE_PATH }}
142+ key : ${{ runner.os }}-${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-${{ hashFiles('pnpm -lock.yaml ') }}
121143
122144 - name : Install dependencies
123- run : npm install --prefer-offline --no-audit
145+ run : pnpm install
124146
125147 - name : Check pretty (backend)
126148 id : check-pretty-be
@@ -149,22 +171,33 @@ jobs:
149171 if : needs.pre-ci.outputs.should-build-be == 'true' || needs.pre-ci.outputs.should-build-pkg == 'true'
150172 steps :
151173 - uses : actions/checkout@v4
174+
152175 - name : Set up Node.js
153176 uses : actions/setup-node@v4
154177 with :
155178 node-version : ${{ env.NODE_VERSION }}
156179
180+ - name : Setup pnpm
181+ uses : pnpm/action-setup@v4
182+ with :
183+ version : ${{ env.PNPM_VERSION }}
184+
185+ - name : Get pnpm store directory
186+ shell : bash
187+ run : |
188+ echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
189+
157190 - name : Cache node modules
158- id : cache-npm
191+ id : cache-pnpm
159192 uses : actions/cache@v4
160193 env :
161194 cache-name : node-modules
162195 with :
163- path : ~/.npm
164- key : ${{ runner.os }}-${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-${{ hashFiles('package -lock.json ') }}
196+ path : ${{ env.STORE_PATH }}
197+ key : ${{ runner.os }}-${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-${{ hashFiles('pnpm -lock.yaml ') }}
165198
166199 - name : Install dependencies
167- run : npm install --prefer-offline --no-audit
200+ run : pnpm install
168201
169202 - name : Check lint
170203 run : npm run lint-be
@@ -181,7 +214,9 @@ jobs:
181214 runs-on : ubuntu-latest
182215 if : needs.pre-ci.outputs.should-build-fe == 'true' || needs.pre-ci.outputs.should-build-pkg == 'true'
183216 steps :
217+
184218 - uses : actions/checkout@v4
219+
185220 - name : Set up Node.js
186221 uses : actions/setup-node@v4
187222 with :
@@ -191,17 +226,27 @@ jobs:
191226 working-directory : ./frontend/src/ts/constants
192227 run : mv ./firebase-config-example.ts ./firebase-config.ts && cp ./firebase-config.ts ./firebase-config-live.ts
193228
229+ - name : Setup pnpm
230+ uses : pnpm/action-setup@v4
231+ with :
232+ version : ${{ env.PNPM_VERSION }}
233+
234+ - name : Get pnpm store directory
235+ shell : bash
236+ run : |
237+ echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
238+
194239 - name : Cache node modules
195- id : cache-npm
240+ id : cache-pnpm
196241 uses : actions/cache@v4
197242 env :
198243 cache-name : node-modules
199244 with :
200- path : ~/.npm
201- key : ${{ runner.os }}-${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-${{ hashFiles('package -lock.json ') }}
245+ path : ${{ env.STORE_PATH }}
246+ key : ${{ runner.os }}-${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-${{ hashFiles('pnpm -lock.yaml ') }}
202247
203248 - name : Install dependencies
204- run : npm install --prefer-offline --no-audit
249+ run : pnpm install
205250
206251 - name : Check lint
207252 run : npm run lint-fe
@@ -219,6 +264,7 @@ jobs:
219264 if : needs.pre-ci.outputs.assets-json == 'true'
220265 steps :
221266 - uses : actions/checkout@v4
267+
222268 - uses : dorny/paths-filter@v3
223269 id : filter
224270 with :
@@ -233,22 +279,33 @@ jobs:
233279 - 'frontend/static/themes/*.json'
234280 - 'frontend/static/challenges/*.json'
235281 - 'frontend/static/layouts/*.json'
282+
236283 - name : Set up Node.js
237284 uses : actions/setup-node@v4
238285 with :
239286 node-version : ${{ env.NODE_VERSION }}
240287
288+ - name : Setup pnpm
289+ uses : pnpm/action-setup@v4
290+ with :
291+ version : ${{ env.PNPM_VERSION }}
292+
293+ - name : Get pnpm store directory
294+ shell : bash
295+ run : |
296+ echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
297+
241298 - name : Cache node modules
242- id : cache-npm
299+ id : cache-pnpm
243300 uses : actions/cache@v4
244301 env :
245302 cache-name : node-modules
246303 with :
247- path : ~/.npm
248- key : ${{ runner.os }}-${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-${{ hashFiles('package -lock.json ') }}
304+ path : ${{ env.STORE_PATH }}
305+ key : ${{ runner.os }}-${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-${{ hashFiles('pnpm -lock.yaml ') }}
249306
250307 - name : Install dependencies
251- run : npm install --prefer-offline --no-audit
308+ run : pnpm install
252309
253310 - name : Lint JSON
254311 run : npm run pr-check-lint-json
@@ -271,23 +328,35 @@ jobs:
271328 runs-on : ubuntu-latest
272329 if : needs.pre-ci.outputs.should-build-pkg == 'true'
273330 steps :
331+
274332 - uses : actions/checkout@v4
333+
275334 - name : Set up Node.js
276335 uses : actions/setup-node@v4
277336 with :
278337 node-version : ${{ env.NODE_VERSION }}
279338
339+ - name : Setup pnpm
340+ uses : pnpm/action-setup@v4
341+ with :
342+ version : ${{ env.PNPM_VERSION }}
343+
344+ - name : Get pnpm store directory
345+ shell : bash
346+ run : |
347+ echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
348+
280349 - name : Cache node modules
281- id : cache-npm
350+ id : cache-pnpm
282351 uses : actions/cache@v4
283352 env :
284353 cache-name : node-modules
285354 with :
286- path : ~/.npm
287- key : ${{ runner.os }}-${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-${{ hashFiles('package -lock.json ') }}
355+ path : ${{ env.STORE_PATH }}
356+ key : ${{ runner.os }}-${{ env.NODE_VERSION }}-build-${{ env.cache-name }}-${{ hashFiles('pnpm -lock.yaml ') }}
288357
289358 - name : Install dependencies
290- run : npm install --prefer-offline --no-audit
359+ run : pnpm install
291360
292361 - name : Check lint
293362 run : npm run lint-pkg
0 commit comments