diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 288c6bc09..758be059d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/.mise.toml b/.mise.toml index 72dce6e31..4add900ba 100644 --- a/.mise.toml +++ b/.mise.toml @@ -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 '#' -# 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" diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 000000000..0e9155d36 --- /dev/null +++ b/.tool-versions @@ -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