19
19
name : Pre-build checks
20
20
runs-on : ubuntu-latest
21
21
timeout-minutes : 15
22
- env :
23
- CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
24
22
steps :
25
23
- name : Checkout repo
26
24
uses : actions/checkout@v2
@@ -33,14 +31,18 @@ jobs:
33
31
- name : Install helm
34
32
uses : azure/setup-helm@v1.1
35
33
36
- - name : Fetch dependencies from cache
37
- id : cache-yarn
38
- uses : actions/cache@v2
39
- with :
40
- path : " **/node_modules"
41
- key : yarn-build-${{ hashFiles('**/yarn.lock') }}
42
- restore-keys : |
43
- yarn-build-
34
+ # NOTE@jsjoeio
35
+ # disabling this until we can audit the build process
36
+ # and the usefulness of this step
37
+ # See: https://github.com/cdr/code-server/issues/4287
38
+ # - name: Fetch dependencies from cache
39
+ # id: cache-yarn
40
+ # uses: actions/cache@v2
41
+ # with:
42
+ # path: "**/node_modules"
43
+ # key: yarn-build-${{ hashFiles('**/yarn.lock') }}
44
+ # restore-keys: |
45
+ # yarn-build-
44
46
45
47
- name : Install dependencies
46
48
# if: steps.cache-yarn.outputs.cache-hit != 'true'
@@ -54,19 +56,11 @@ jobs:
54
56
run : yarn lint
55
57
if : success()
56
58
57
- - name : Run code-server unit tests
58
- run : yarn test:unit
59
- if : success()
60
-
61
- - name : Upload coverage report to Codecov
62
- run : yarn coverage
63
- if : success()
64
-
65
59
audit-ci :
66
60
name : Run audit-ci
67
61
needs : prebuild
68
62
runs-on : ubuntu-latest
69
- timeout-minutes : 5
63
+ timeout-minutes : 15
70
64
steps :
71
65
- name : Checkout repo
72
66
uses : actions/checkout@v2
98
92
needs : prebuild
99
93
runs-on : ubuntu-latest
100
94
timeout-minutes : 30
95
+ env :
96
+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
101
97
steps :
102
98
- uses : actions/checkout@v2
103
99
with :
@@ -146,14 +142,25 @@ jobs:
146
142
path : |
147
143
vendor/modules/code-oss-dev/.build
148
144
vendor/modules/code-oss-dev/out-build
149
- vendor/modules/code-oss-dev/out-vscode
150
- vendor/modules/code-oss-dev/out-vscode-min
151
- key : vscode-build-${{ steps.vscode-rev.outputs.rev }}
145
+ vendor/modules/code-oss-dev/out-vscode-reh-web
146
+ vendor/modules/code-oss-dev/out-vscode-reh-web- min
147
+ key : vscode-reh- build-${{ steps.vscode-rev.outputs.rev }}
152
148
153
149
- name : Build vscode
154
150
if : steps.cache-vscode.outputs.cache-hit != 'true'
155
151
run : yarn build:vscode
156
152
153
+ # Our code imports code from VS Code's `out` directory meaning VS Code
154
+ # must be built before running these tests.
155
+ # TODO: Move to its own step?
156
+ - name : Run code-server unit tests
157
+ run : yarn test:unit
158
+ if : success()
159
+
160
+ - name : Upload coverage report to Codecov
161
+ run : yarn coverage
162
+ if : success()
163
+
157
164
# The release package does not contain any native modules
158
165
# and is neutral to architecture/os/libc version.
159
166
- name : Create release package
@@ -283,7 +290,7 @@ jobs:
283
290
echo "$HOME/.local/bin" >> $GITHUB_PATH
284
291
285
292
- name : Install cross-compiler
286
- run : sudo apt install $PACKAGE
293
+ run : sudo apt update && sudo apt install $PACKAGE
287
294
env :
288
295
PACKAGE : ${{ format('g++-{0}', matrix.prefix) }}
289
296
@@ -371,9 +378,6 @@ jobs:
371
378
with :
372
379
node-version : " 14"
373
380
374
- - name : Install playwright OS dependencies
375
- run : npx playwright install-deps
376
-
377
381
- name : Fetch dependencies from cache
378
382
id : cache-yarn
379
383
uses : actions/cache@v2
@@ -399,14 +403,10 @@ jobs:
399
403
if : steps.cache-yarn.outputs.cache-hit != 'true'
400
404
run : yarn --frozen-lockfile
401
405
402
- # HACK: this shouldn't need to exist, but put it here anyway
403
- # in an attempt to solve Playwright cache failures.
404
- - name : Reinstall playwright
405
- if : steps.cache-yarn.outputs.cache-hit == 'true'
406
+ - name : Install Playwright OS dependencies
406
407
run : |
407
- cd test/
408
- rm -r node_modules/playwright
409
- yarn install --check-files
408
+ ./test/node_modules/.bin/playwright install-deps
409
+ ./test/node_modules/.bin/playwright install
410
410
411
411
- name : Run end-to-end tests
412
412
run : yarn test:e2e
@@ -428,7 +428,7 @@ jobs:
428
428
uses : actions/checkout@v2
429
429
- name : Run Trivy vulnerability scanner in repo mode
430
430
# Commit SHA for v0.0.17
431
- uses : aquasecurity/trivy-action@8eccb5539730451af599c84f444c6d6cf0fc2bb0
431
+ uses : aquasecurity/trivy-action@1ccef265f594a7555a720f623a461a3d69b45bf7
432
432
with :
433
433
scan-type : " fs"
434
434
scan-ref : " ."
0 commit comments