@@ -18,7 +18,7 @@ concurrency:
1818# Note: if: success() is used in several jobs -
1919# this ensures that it only executes if all previous jobs succeeded.
2020
21- # if: steps.cache-yarn .outputs.cache-hit != 'true'
21+ # if: steps.cache-node-modules .outputs.cache-hit != 'true'
2222# will skip running `yarn install` if it successfully fetched from cache
2323
2424jobs :
2929 steps :
3030 - name : Checkout repo
3131 uses : actions/checkout@v3
32- with :
33- fetch-depth : 0
34- submodules : true
3532
3633 - name : Install Node.js v16
3734 uses : actions/setup-node@v3
4037
4138 - name : Install helm
4239 uses : azure/setup-helm@v3.3
40+ with :
41+ token : ${{ secrets.GITHUB_TOKEN }}
42+
43+ - name : Install helm kubeval plugin
44+ run : helm plugin install https://github.com/instrumenta/helm-kubeval
4345
4446 - name : Fetch dependencies from cache
45- id : cache-yarn
47+ id : cache-node-modules
4648 uses : actions/cache@v3
4749 with :
4850 path : " **/node_modules"
5153 yarn-build-
5254
5355 - name : Install dependencies
54- if : steps.cache-yarn .outputs.cache-hit != 'true'
55- run : yarn --frozen-lockfile
56+ if : steps.cache-node-modules .outputs.cache-hit != 'true'
57+ run : SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
5658
5759 - name : Run yarn fmt
5860 run : yarn fmt
@@ -73,11 +75,13 @@ jobs:
7375 - name : Checkout repo
7476 uses : actions/checkout@v3
7577 with :
76- fetch-depth : 0
7778 submodules : true
7879
7980 - name : Install quilt
80- run : sudo apt update && sudo apt install quilt
81+ uses : awalsh128/cache-apt-pkgs-action@latest
82+ with :
83+ packages : quilt
84+ version : 1.0
8185
8286 - name : Patch Code
8387 run : quilt push -a
8892 node-version : " 16"
8993
9094 - name : Fetch dependencies from cache
91- id : cache-yarn
95+ id : cache-node-modules
9296 uses : actions/cache@v3
9397 with :
9498 path : " **/node_modules"
97101 yarn-build-
98102
99103 - name : Install dependencies
100- if : steps.cache-yarn .outputs.cache-hit != 'true'
104+ if : steps.cache-node-modules .outputs.cache-hit != 'true'
101105 run : yarn --frozen-lockfile
102106
103107 - name : Build code-server
@@ -171,8 +175,6 @@ jobs:
171175 steps :
172176 - name : Checkout repo
173177 uses : actions/checkout@v3
174- with :
175- fetch-depth : 0
176178
177179 - name : Download artifact
178180 uses : actions/download-artifact@v3
@@ -224,8 +226,6 @@ jobs:
224226 steps :
225227 - name : Checkout repo
226228 uses : actions/checkout@v3
227- with :
228- fetch-depth : 0
229229
230230 - name : Install Node.js v16
231231 uses : actions/setup-node@v3
@@ -262,8 +262,18 @@ jobs:
262262 - name : Build standalone release
263263 run : source scl_source enable devtoolset-9 && yarn release:standalone
264264
265+ - name : Fetch dependencies from cache
266+ id : cache-node-modules
267+ uses : actions/cache@v3
268+ with :
269+ path : " **/node_modules"
270+ key : yarn-build-${{ hashFiles('**/yarn.lock') }}
271+ restore-keys : |
272+ yarn-build-
273+
265274 - name : Install test dependencies
266- run : SKIP_SUBMODULE_DEPS=1 yarn install
275+ if : steps.cache-node-modules.outputs.cache-hit != 'true'
276+ run : SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
267277
268278 - name : Run integration tests on standalone release
269279 run : yarn test:integration
@@ -320,8 +330,6 @@ jobs:
320330 steps :
321331 - name : Checkout repo
322332 uses : actions/checkout@v3
323- with :
324- fetch-depth : 0
325333
326334 - name : Install Node.js v16
327335 uses : actions/setup-node@v3
@@ -373,8 +381,6 @@ jobs:
373381 steps :
374382 - name : Checkout repo
375383 uses : actions/checkout@v3
376- with :
377- fetch-depth : 0
378384
379385 - name : Install Node.js v16
380386 uses : actions/setup-node@v3
@@ -398,7 +404,17 @@ jobs:
398404 - name : Build standalone release
399405 run : yarn release:standalone
400406
407+ - name : Fetch dependencies from cache
408+ id : cache-node-modules
409+ uses : actions/cache@v3
410+ with :
411+ path : " **/node_modules"
412+ key : yarn-build-${{ hashFiles('**/yarn.lock') }}
413+ restore-keys : |
414+ yarn-build-
415+
401416 - name : Install test dependencies
417+ if : steps.cache-node-modules.outputs.cache-hit != 'true'
402418 run : SKIP_SUBMODULE_DEPS=1 yarn install
403419
404420 - name : Run integration tests on standalone release
@@ -425,16 +441,14 @@ jobs:
425441 steps :
426442 - name : Checkout repo
427443 uses : actions/checkout@v3
428- with :
429- fetch-depth : 0
430444
431445 - name : Install Node.js v16
432446 uses : actions/setup-node@v3
433447 with :
434448 node-version : " 16"
435449
436450 - name : Fetch dependencies from cache
437- id : cache-yarn
451+ id : cache-node-modules
438452 uses : actions/cache@v3
439453 with :
440454 path : " **/node_modules"
@@ -455,7 +469,7 @@ jobs:
455469 mv code-server*-linux-amd64 code-server-linux-amd64
456470
457471 - name : Install dependencies
458- if : steps.cache-yarn .outputs.cache-hit != 'true'
472+ if : steps.cache-node-modules .outputs.cache-hit != 'true'
459473 run : SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
460474
461475 - name : Install Playwright OS dependencies
@@ -488,16 +502,14 @@ jobs:
488502 steps :
489503 - name : Checkout repo
490504 uses : actions/checkout@v3
491- with :
492- fetch-depth : 0
493505
494506 - name : Install Node.js v16
495507 uses : actions/setup-node@v3
496508 with :
497509 node-version : " 16"
498510
499511 - name : Fetch dependencies from cache
500- id : cache-yarn
512+ id : cache-node-modules
501513 uses : actions/cache@v3
502514 with :
503515 path : " **/node_modules"
@@ -518,7 +530,7 @@ jobs:
518530 mv code-server*-linux-amd64 code-server-linux-amd64
519531
520532 - name : Install dependencies
521- if : steps.cache-yarn .outputs.cache-hit != 'true'
533+ if : steps.cache-node-modules .outputs.cache-hit != 'true'
522534 run : SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
523535
524536 - name : Install Playwright OS dependencies
0 commit comments