Skip to content

Commit

Permalink
Fix GitHub Actions workflows to use correct node version
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
danlivings-dxw committed Oct 14, 2024
1 parent 6d6e1b9 commit 3666ea6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Read .nvmrc
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT
id: nvm
- name: Use Node.js ${{ steps.nvm.outputs.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: lts/*
node-version: ${{ steps.nvm.outputs.NODE_VERSION }}
- name: Install dependencies
run: script/setup
- name: Install Playwright Browsers
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Read .nvmrc
run: echo "{NODE_VERSION}={$(cat .nvmrc)}" >> $GITHUB_OUTPUT
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT
id: nvm
- name: Use Node.js ${{ steps.nvm.outputs.NODE_VERSION }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ steps.nvm.outputs.NODE_VERSION }}
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
./script/setup
Expand Down

0 comments on commit 3666ea6

Please sign in to comment.