Skip to content

Commit

Permalink
Downgrade node version to 16.X and start using .tool-versions so that…
Browse files Browse the repository at this point in the history
… we can use same version in GH runner
  • Loading branch information
onnimonni committed Oct 30, 2024
1 parent 8dd7d71 commit 5c3596a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 15 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 16
node-version-file: .tool-versions
cache: yarn

- run: yarn install --frozen-lockfile
Expand All @@ -19,11 +19,11 @@ jobs:
build-minimal:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 16
node-version-file: .tool-versions
cache: yarn

- run: yarn install --frozen-lockfile
Expand All @@ -37,11 +37,11 @@ jobs:
build-full:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 16
node-version-file: .tool-versions
cache: yarn

- run: yarn install --frozen-lockfile
Expand All @@ -57,11 +57,11 @@ jobs:
# build-full-official-api:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/checkout@v4

# - uses: actions/setup-node@v3
# - uses: actions/setup-node@v4
# with:
# node-version: 16
# node-version-file: .tool-versions
# cache: yarn

# - run: yarn install --frozen-lockfile
Expand Down
7 changes: 4 additions & 3 deletions .mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
# Source: https://stackoverflow.com/a/74732671
python = ['3.10']

# The node-gyp module doesn't work properly when using node 20
# Node 20.X breaks the node-gyp module:
# TypeError: Cannot assign to read only property 'cflags' of object '#<Object>'
# This is the reason we need to stay with node 18
# See more: https://stackoverflow.com/a/77910474/1337062
node = ['18']
# Node 18.X breaks ava test runner doesn't seem to work in package/notion-utils tests
# node = ['16']
# We read this value from .tool-versions file instead

# Installing with npm doesn't seem to work out, use yarn everywhere
"npm:yarn" = "latest"
Expand Down
7 changes: 7 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# FIXME: Remove this file when actions/setup-node supports .mise.toml
# See more: https://github.com/actions/setup-node/issues/787
nodejs 16.20.2

# node-gyp has issues with newer python versions.
# This is the latest version of 3.10.x as of October 2024
python 3.10.13

0 comments on commit 5c3596a

Please sign in to comment.