Skip to content

Commit d2a395e

Browse files
committed
Preserve dependencies for e2e tests
To avoid having to install them again. Also moved an env block to the root of the job.
1 parent 3f1a650 commit d2a395e

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

.github/workflows/build.yaml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ jobs:
157157
token: ${{ secrets.CODECOV_TOKEN }}
158158

159159
build:
160-
name: Build code-server npm package
160+
name: Build code-server linux-x64 package
161161
runs-on: ubuntu-22.04
162162
env:
163163
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
@@ -197,19 +197,16 @@ jobs:
197197
uses: actions/cache@v4
198198
with:
199199
path: lib/vscode-reh-web-linux-x64-min-ci
200-
key: vscode-reh-linux-x64-package-${{ secrets.VSCODE_CACHE_VERSION }}-${{ steps.vscode-rev.outputs.rev }}-${{ hashFiles('patches/*.diff', 'ci/build/build-vscode.sh') }}
200+
key: vscode-linux-x64-package-${{ secrets.VSCODE_CACHE_VERSION }}-${{ steps.vscode-rev.outputs.rev }}-${{ hashFiles('patches/*.diff', 'ci/build/build-vscode.sh') }}
201201
- name: Build vscode
202202
if: steps.cache-vscode.outputs.cache-hit != 'true'
203203
run: |
204204
pushd lib/vscode
205205
npm ci
206206
popd
207207
npm run build:vscode
208-
# The release package is just the compiled code, does not contain any
209-
# native modules, and is thus neutral to architecture/os/libc version.
210-
- run: npm run release
211-
if: success()
212-
# https://github.com/actions/upload-artifact/issues/38
208+
# Push up an artifact containing the linux-x64 release.
209+
- run: KEEP_MODULES=1 npm run release
213210
- run: tar -czf package.tar.gz release
214211
- uses: actions/upload-artifact@v7
215212
with:
@@ -236,7 +233,6 @@ jobs:
236233
with:
237234
name: npm-package
238235
- run: tar -xzf package.tar.gz
239-
- run: cd release && npm install --unsafe-perm --omit=dev
240236
- name: Install Playwright OS dependencies
241237
run: |
242238
./test/node_modules/.bin/playwright install-deps
@@ -252,6 +248,8 @@ jobs:
252248
test-e2e-proxy:
253249
name: Run e2e tests behind proxy
254250
runs-on: ubuntu-22.04
251+
env:
252+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
255253
needs: [changes, build]
256254
if: needs.changes.outputs.code == 'true' || needs.changes.outputs.deps == 'true'
257255
steps:
@@ -269,7 +267,6 @@ jobs:
269267
with:
270268
name: npm-package
271269
- run: tar -xzf package.tar.gz
272-
- run: cd release && npm install --unsafe-perm --omit=dev
273270
- name: Install Playwright OS dependencies
274271
run: |
275272
./test/node_modules/.bin/playwright install-deps
@@ -282,8 +279,6 @@ jobs:
282279
~/.cache/caddy
283280
key: cache-caddy-2.5.2
284281
- name: Install Caddy
285-
env:
286-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
287282
if: steps.caddy-cache.outputs.cache-hit != 'true'
288283
run: |
289284
gh release download v2.5.2 --repo caddyserver/caddy --pattern "caddy_2.5.2_linux_amd64.tar.gz"

0 commit comments

Comments
 (0)