29
29
steps :
30
30
- name : Checkout repo
31
31
uses : actions/checkout@v3
32
+ with :
33
+ fetch-depth : 0
34
+ submodules : true
32
35
33
36
- name : Install Node.js v14
34
37
uses : actions/setup-node@v3
71
74
steps :
72
75
- name : Checkout repo
73
76
uses : actions/checkout@v3
77
+ with :
78
+ fetch-depth : 0
79
+ submodules : true
74
80
75
81
- name : Install Node.js v14
76
82
uses : actions/setup-node@v3
@@ -102,9 +108,11 @@ jobs:
102
108
env :
103
109
CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
104
110
steps :
111
+ - name : Checkout repo
105
112
- uses : actions/checkout@v3
106
113
with :
107
114
fetch-depth : 0
115
+ submodules : true
108
116
109
117
- name : Install Node.js v14
110
118
uses : actions/setup-node@v3
@@ -119,7 +127,7 @@ jobs:
119
127
# path: |
120
128
# "**/node_modules"
121
129
# "**/vendor/modules"
122
- # "**/vendor/modules/code-oss-dev /node_modules"
130
+ # "**/lib/vscode /node_modules"
123
131
# key: yarn-build-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/vendor/yarn.lock') }}
124
132
# restore-keys: |
125
133
# yarn-build-
@@ -131,27 +139,26 @@ jobs:
131
139
- name : Build code-server
132
140
run : yarn build
133
141
134
- # Parse the hash of the latest commit inside vendor/modules/code-oss-dev
142
+ # Parse the hash of the latest commit inside lib/vscode
135
143
# use this to avoid rebuilding it if nothing changed
136
144
# How it works: the `git log` command fetches the hash of the last commit
137
- # that changed a file inside `vendor/modules/code-oss-dev `. If a commit changes any file in there,
145
+ # that changed a file inside `lib/vscode `. If a commit changes any file in there,
138
146
# the hash returned will change, and we rebuild vscode. If the hash did not change,
139
147
# (for example, a change to `src/` or `docs/`), we reuse the same build as last time.
140
148
# This saves a lot of time in CI, as compiling VSCode can take anywhere from 5-10 minutes.
141
- - name : Get latest vendor/modules/code-oss-dev rev
149
+ - name : Get latest lib/vscode rev
142
150
id : vscode-rev
143
- run : echo "::set-output name=rev::$(jq -r '.devDependencies["code-oss-dev"]' vendor /package.json | sed -r 's|.*#(.*)$|\1|')"
151
+ run : echo "::set-output name=rev::$(jq -r '.devDependencies["code-oss-dev"]' lib/vscode /package.json | sed -r 's|.*#(.*)$|\1|')"
144
152
145
153
- name : Attempt to fetch vscode build from cache
146
154
id : cache-vscode-2
147
155
uses : actions/cache@v2
148
156
with :
149
157
path : |
150
- vendor/modules/code-oss-dev/.build
151
- vendor/modules/code-oss-dev/package.json
152
- vendor/modules/code-oss-dev/out-build
153
- vendor/modules/code-oss-dev/out-vscode-reh-web
154
- vendor/modules/code-oss-dev/out-vscode-reh-web-min
158
+ lib/vscode/.build
159
+ lib/vscode/out-build
160
+ lib/vscode/out-vscode-reh-web
161
+ lib/vscode/out-vscode-reh-web-min
155
162
key : vscode-reh-build-${{ secrets.VSCODE_CACHE_VERSION }}-${{ steps.vscode-rev.outputs.rev }}
156
163
157
164
- name : Build vscode
@@ -197,7 +204,11 @@ jobs:
197
204
if : github.event.pull_request.head.repo.full_name == github.repository
198
205
runs-on : ubuntu-latest
199
206
steps :
207
+ - name : Checkout repo
200
208
- uses : actions/checkout@v3
209
+ with :
210
+ fetch-depth : 0
211
+ submodules : true
201
212
202
213
- uses : actions/download-artifact@v3
203
214
id : download
@@ -226,7 +237,11 @@ jobs:
226
237
container : " centos:7"
227
238
228
239
steps :
240
+ - name : Checkout repo
229
241
- uses : actions/checkout@v3
242
+ with :
243
+ fetch-depth : 0
244
+ submodules : true
230
245
231
246
- name : Install Node.js v14
232
247
uses : actions/setup-node@v3
@@ -315,7 +330,11 @@ jobs:
315
330
NODE_VERSION : v14.17.4
316
331
317
332
steps :
333
+ - name : Checkout repo
318
334
- uses : actions/checkout@v3
335
+ with :
336
+ fetch-depth : 0
337
+ submodules : true
319
338
320
339
- name : Install Node.js v14
321
340
uses : actions/setup-node@v3
@@ -364,7 +383,11 @@ jobs:
364
383
runs-on : macos-latest
365
384
timeout-minutes : 15
366
385
steps :
386
+ - name : Checkout repo
367
387
- uses : actions/checkout@v3
388
+ with :
389
+ fetch-depth : 0
390
+ submodules : true
368
391
369
392
- name : Install Node.js v14
370
393
uses : actions/setup-node@v3
@@ -409,7 +432,11 @@ jobs:
409
432
# since VS Code will load faster due to the bundling.
410
433
CODE_SERVER_TEST_ENTRY : " ./release-packages/code-server-linux-amd64"
411
434
steps :
435
+ - name : Checkout repo
412
436
- uses : actions/checkout@v3
437
+ with :
438
+ fetch-depth : 0
439
+ submodules : true
413
440
414
441
- name : Install Node.js v14
415
442
uses : actions/setup-node@v3
@@ -446,12 +473,6 @@ jobs:
446
473
./test/node_modules/.bin/playwright install-deps
447
474
./test/node_modules/.bin/playwright install
448
475
449
- # TODO@jsjoeio - remove once we switch to submodules.
450
- - name : Create package.json for testing
451
- run : |
452
- mkdir -p ./vendor/modules/code-oss-dev
453
- echo '{ "version": "test" }' > ./vendor/modules/code-oss-dev/package.json
454
-
455
476
- name : Run end-to-end tests
456
477
run : yarn test:e2e
457
478
@@ -470,6 +491,10 @@ jobs:
470
491
steps :
471
492
- name : Checkout code
472
493
uses : actions/checkout@v3
494
+ with :
495
+ fetch-depth : 0
496
+ submodules : true
497
+
473
498
- name : Run Trivy vulnerability scanner in repo mode
474
499
uses : aquasecurity/trivy-action@296212627a1e693efa09c00adc3e03b2ba8edf18
475
500
with :
@@ -480,6 +505,7 @@ jobs:
480
505
template : " @/contrib/sarif.tpl"
481
506
output : " trivy-repo-results.sarif"
482
507
severity : " HIGH,CRITICAL"
508
+
483
509
- name : Upload Trivy scan results to GitHub Security tab
484
510
uses : github/codeql-action/upload-sarif@v1
485
511
with :
0 commit comments