Skip to content

Commit

Permalink
Fix Windows CI by pinning node version (#2297)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
pokey authored Apr 18, 2024
1 parent 3f2a79b commit 957caee
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version-file: package.json
node-version-file: .nvmrc
cache: pnpm
- run: pnpm --color install
- run: pnpm --color compile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version-file: package.json
node-version-file: .nvmrc
cache: pnpm
- run: pnpm --color install
- uses: pre-commit/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version-file: package.json
node-version-file: .nvmrc
cache: pnpm
- run: bash -x scripts/build-and-assemble-website.sh
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version-file: package.json
node-version-file: .nvmrc
cache: pnpm
- run: mkdir -p "${{ env.VSCODE_CRASH_DIR }}" "${{ env.VSCODE_LOGS_DIR }}"
shell: bash
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.12.1
34 changes: 20 additions & 14 deletions packages/test-harness/src/launchVscodeAndRunTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,26 @@ export async function launchVscodeAndRunTests(extensionTestsPath: string) {
resolveCliArgsFromVSCodeExecutablePath(vscodeExecutablePath);

// Install extension dependencies
cp.spawnSync(
cli,
[
...args,
...extensionDependencies.flatMap((dependency) => [
"--install-extension",
dependency,
]),
],
{
encoding: "utf-8",
stdio: "inherit",
},
);
const extensionInstallArgs = [
...args,
...extensionDependencies.flatMap((dependency) => [
"--install-extension",
dependency,
]),
];

console.log("starting to install dependency extensions");
console.log(`cli: ${cli}`);
console.log(JSON.stringify(extensionInstallArgs, null, 2));

const { status, signal, error } = cp.spawnSync(cli, extensionInstallArgs, {
encoding: "utf-8",
stdio: "inherit",
});

console.log("status: ", status);
console.log("signal: ", signal);
console.log("error: ", error);

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

Expand Down

0 comments on commit 957caee

Please sign in to comment.