Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'Lint & Test' and 'Playwright Tests' GitHub Actions workflows #72

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

danlivings-dxw
Copy link
Contributor

@danlivings-dxw danlivings-dxw commented Oct 14, 2024

These workflows have suddenly stopped working with no obvious code change as the cause.

It turns out that there are two issues with the workflows, which this PR fixes:

  • The NODE_VERSION variable was not being correctly set, so the setup-node action was defaulting to the latest LTS version (20.17.0).
  • nvm is no longer available, so the script/bootstrap script fails.

The NODE_VERSION variable was not being correctly set, so the
`setup-node` action was defaulting to the latest LTS version (20.17.0).
This was causing `better-sqlite3` problems as it relies on native code
which does not target that version.
@danlivings-dxw danlivings-dxw force-pushed the fix/use-correct-node-version-in-github-actions branch from d8324fc to d30692d Compare October 14, 2024 11:21
`nvm` no longer seems to be present when running Node in a GitHub
Action. However, the correct Node version is already extracted in
previous steps, so it's not actually needed here. Therefore, the setup
script can just call `npm install` rather than delegate to
`script/bootstrap` in a CI environment, and will do this if the first
argument is `--ci`.
@danlivings-dxw danlivings-dxw force-pushed the fix/use-correct-node-version-in-github-actions branch from d30692d to df52c79 Compare October 14, 2024 11:24
@danlivings-dxw danlivings-dxw changed the title Fix GitHub Actions workflows to use correct node version Fix 'Lint & Test' and 'Playwright Tests' GitHub Actions workflows Oct 14, 2024
@danlivings-dxw danlivings-dxw merged commit 8977ba0 into main Oct 14, 2024
3 checks passed
@danlivings-dxw danlivings-dxw deleted the fix/use-correct-node-version-in-github-actions branch October 14, 2024 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant