未验证 提交 03651e5e 编写于 作者: A Asher 提交者: GitHub

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.
上级 219cad17
...@@ -404,7 +404,9 @@ jobs: ...@@ -404,7 +404,9 @@ jobs:
run: yarn --frozen-lockfile run: yarn --frozen-lockfile
- name: Install Playwright OS dependencies - name: Install Playwright OS dependencies
run: ./test/node_modules/.bin/playwright install-deps run: |
./test/node_modules/.bin/playwright install-deps
./test/node_modules/.bin/playwright install
- name: Run end-to-end tests - name: Run end-to-end tests
run: yarn test:e2e run: yarn test:e2e
......
...@@ -6,27 +6,28 @@ main() { ...@@ -6,27 +6,28 @@ main() {
echo "Installing code-server test dependencies..." echo "Installing code-server test dependencies..."
local args=(install)
if [[ ${CI-} ]]; then
args+=(--frozen-lockfile)
fi
cd test cd test
yarn install yarn "${args[@]}"
cd .. cd ..
cd vendor cd vendor
echo "Installing vendor dependencies..." echo "Installing vendor dependencies..."
# * We install in 'modules' instead of 'node_modules' because VS Code's extensions # We install in 'modules' instead of 'node_modules' because VS Code's
# use a webpack config which cannot differentiate between its own node_modules # extensions use a webpack config which cannot differentiate between its own
# and itself being in a directory with the same name. # node_modules and itself being in a directory with the same name.
# args+=(--modules-folder modules)
# * We ignore scripts because NPM/Yarn's default behavior is to assume that
# devDependencies are not needed, and that even git repo based packages are
# assumed to be compiled. Because the default behavior for VS Code's `postinstall`
# assumes we're also compiled, this needs to be ignored.
local args=(install --modules-folder modules --ignore-scripts) # We ignore scripts because NPM/Yarn's default behavior is to assume that
# devDependencies are not needed, and that even git repo based packages are
if [[ ${CI-} ]]; then # assumed to be compiled. Because the default behavior for VS Code's
args+=("--frozen-lockfile") # `postinstall` assumes we're also compiled, this needs to be ignored.
fi args+=(--ignore-scripts)
yarn "${args[@]}" yarn "${args[@]}"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"license": "MIT", "license": "MIT",
"#": "We must put jest in a sub-directory otherwise VS Code somehow picks up the types and generates conflicts with mocha.", "#": "We must put jest in a sub-directory otherwise VS Code somehow picks up the types and generates conflicts with mocha.",
"devDependencies": { "devDependencies": {
"@playwright/test": "^1.12.1", "@playwright/test": "^1.16.3",
"@types/jest": "^27.0.2", "@types/jest": "^27.0.2",
"@types/jsdom": "^16.2.13", "@types/jsdom": "^16.2.13",
"@types/node-fetch": "^2.5.8", "@types/node-fetch": "^2.5.8",
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
"jest-fetch-mock": "^3.0.3", "jest-fetch-mock": "^3.0.3",
"jsdom": "^16.4.0", "jsdom": "^16.4.0",
"node-fetch": "^2.6.1", "node-fetch": "^2.6.1",
"playwright": "^1.12.1", "playwright": "^1.16.3",
"supertest": "^6.1.6", "supertest": "^6.1.6",
"ts-jest": "^27.0.7", "ts-jest": "^27.0.7",
"wtfnode": "^0.9.1" "wtfnode": "^0.9.1"
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册