Skip to content

Commit 03651e5

Browse files
authored
Use frozen lockfile for test dependencies in CI (#4442)
* Use frozen lockfile for test dependencies in CI This might be causing more Playwright issues. * Bump Playwright Mostly just to trigger a reinstall of dependencies since it is cached and still failing. Once updated it errors saying install needs to run so add that too.
1 parent 219cad1 commit 03651e5

File tree

4 files changed

+420
-510
lines changed

4 files changed

+420
-510
lines changed

.github/workflows/ci.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,9 @@ jobs:
404404
run: yarn --frozen-lockfile
405405

406406
- name: Install Playwright OS dependencies
407-
run: ./test/node_modules/.bin/playwright install-deps
407+
run: |
408+
./test/node_modules/.bin/playwright install-deps
409+
./test/node_modules/.bin/playwright install
408410
409411
- name: Run end-to-end tests
410412
run: yarn test:e2e

ci/dev/postinstall.sh

+15-14
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,28 @@ main() {
66

77
echo "Installing code-server test dependencies..."
88

9+
local args=(install)
10+
if [[ ${CI-} ]]; then
11+
args+=(--frozen-lockfile)
12+
fi
13+
914
cd test
10-
yarn install
15+
yarn "${args[@]}"
1116
cd ..
1217

1318
cd vendor
1419
echo "Installing vendor dependencies..."
1520

16-
# * We install in 'modules' instead of 'node_modules' because VS Code's extensions
17-
# use a webpack config which cannot differentiate between its own node_modules
18-
# and itself being in a directory with the same name.
19-
#
20-
# * We ignore scripts because NPM/Yarn's default behavior is to assume that
21-
# devDependencies are not needed, and that even git repo based packages are
22-
# assumed to be compiled. Because the default behavior for VS Code's `postinstall`
23-
# assumes we're also compiled, this needs to be ignored.
21+
# We install in 'modules' instead of 'node_modules' because VS Code's
22+
# extensions use a webpack config which cannot differentiate between its own
23+
# node_modules and itself being in a directory with the same name.
24+
args+=(--modules-folder modules)
2425

25-
local args=(install --modules-folder modules --ignore-scripts)
26-
27-
if [[ ${CI-} ]]; then
28-
args+=("--frozen-lockfile")
29-
fi
26+
# We ignore scripts because NPM/Yarn's default behavior is to assume that
27+
# devDependencies are not needed, and that even git repo based packages are
28+
# assumed to be compiled. Because the default behavior for VS Code's
29+
# `postinstall` assumes we're also compiled, this needs to be ignored.
30+
args+=(--ignore-scripts)
3031

3132
yarn "${args[@]}"
3233

test/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"license": "MIT",
33
"#": "We must put jest in a sub-directory otherwise VS Code somehow picks up the types and generates conflicts with mocha.",
44
"devDependencies": {
5-
"@playwright/test": "^1.12.1",
5+
"@playwright/test": "^1.16.3",
66
"@types/jest": "^27.0.2",
77
"@types/jsdom": "^16.2.13",
88
"@types/node-fetch": "^2.5.8",
@@ -13,7 +13,7 @@
1313
"jest-fetch-mock": "^3.0.3",
1414
"jsdom": "^16.4.0",
1515
"node-fetch": "^2.6.1",
16-
"playwright": "^1.12.1",
16+
"playwright": "^1.16.3",
1717
"supertest": "^6.1.6",
1818
"ts-jest": "^27.0.7",
1919
"wtfnode": "^0.9.1"

0 commit comments

Comments
 (0)