Skip to content

Commit 957caee

Browse files
authored
Fix Windows CI by pinning node version (#2297)
Windows CI started failing due to a node.js regression. We should really be pinning node, like we pin pnpm and all our pnpm dependencies. The only things we don't want to pin are OS version and vscode version This PR pins node and adds some debug output for the future ## Checklist - [x] Pin node using technique removed from #2217 - [x] Double-check pnpm pinning - [x] Keep some of the print statements here - [x] Remove code that slices args - [ ] Add checklist somewhere of versions to check when this kind of thing happens - [ ] node version (note this will be pinned) - [ ] OS version - [ ] vscode version - [-] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [-] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [-] I have not broken the cheatsheet
1 parent 3f2a79b commit 957caee

File tree

6 files changed

+25
-18
lines changed

6 files changed

+25
-18
lines changed

.github/workflows/deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- run: corepack enable
2121
- uses: actions/setup-node@v4
2222
with:
23-
node-version-file: package.json
23+
node-version-file: .nvmrc
2424
cache: pnpm
2525
- run: pnpm --color install
2626
- run: pnpm --color compile

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- run: corepack enable
2222
- uses: actions/setup-node@v4
2323
with:
24-
node-version-file: package.json
24+
node-version-file: .nvmrc
2525
cache: pnpm
2626
- run: pnpm --color install
2727
- uses: pre-commit/[email protected]

.github/workflows/test-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ jobs:
1616
- run: corepack enable
1717
- uses: actions/setup-node@v4
1818
with:
19-
node-version-file: package.json
19+
node-version-file: .nvmrc
2020
cache: pnpm
2121
- run: bash -x scripts/build-and-assemble-website.sh

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- run: corepack enable
3232
- uses: actions/setup-node@v4
3333
with:
34-
node-version-file: package.json
34+
node-version-file: .nvmrc
3535
cache: pnpm
3636
- run: mkdir -p "${{ env.VSCODE_CRASH_DIR }}" "${{ env.VSCODE_LOGS_DIR }}"
3737
shell: bash

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v20.12.1

packages/test-harness/src/launchVscodeAndRunTests.ts

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,26 @@ export async function launchVscodeAndRunTests(extensionTestsPath: string) {
4141
resolveCliArgsFromVSCodeExecutablePath(vscodeExecutablePath);
4242

4343
// Install extension dependencies
44-
cp.spawnSync(
45-
cli,
46-
[
47-
...args,
48-
...extensionDependencies.flatMap((dependency) => [
49-
"--install-extension",
50-
dependency,
51-
]),
52-
],
53-
{
54-
encoding: "utf-8",
55-
stdio: "inherit",
56-
},
57-
);
44+
const extensionInstallArgs = [
45+
...args,
46+
...extensionDependencies.flatMap((dependency) => [
47+
"--install-extension",
48+
dependency,
49+
]),
50+
];
51+
52+
console.log("starting to install dependency extensions");
53+
console.log(`cli: ${cli}`);
54+
console.log(JSON.stringify(extensionInstallArgs, null, 2));
55+
56+
const { status, signal, error } = cp.spawnSync(cli, extensionInstallArgs, {
57+
encoding: "utf-8",
58+
stdio: "inherit",
59+
});
60+
61+
console.log("status: ", status);
62+
console.log("signal: ", signal);
63+
console.log("error: ", error);
5864

5965
console.log("finished installing dependency extensions");
6066

0 commit comments

Comments
 (0)