Skip to content

Commit

Permalink
Run CI with Node.js v18 and v20 (donmccurdy#1222)
Browse files Browse the repository at this point in the history
Work around Ava / Node.js incompatibility.
See privatenumber/tsx#354
  • Loading branch information
donmccurdy authored Dec 29, 2023
1 parent 4ccc9dc commit 40352f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
# See: https://github.com/privatenumber/tsx/issues/354
node-version: [v18.18.x]
node-version: [v18, v20]
env:
CI: true
steps:
Expand All @@ -29,7 +29,7 @@ jobs:
- run: yarn dist

# Test.
- run: yarn test --no-worker-threads # https://github.com/avajs/ava/discussions/3158
- run: yarn test
- run: yarn lint

#############################################################################
Expand All @@ -38,7 +38,7 @@ jobs:
runs-on: ubuntu-latest
env:
CI: true
NODE_VERSION: v18.18.x
NODE_VERSION: v18
steps:
# Setup.
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
Expand All @@ -64,7 +64,7 @@ jobs:
runs-on: ubuntu-latest
env:
CI: true
NODE_VERSION: v18.18.x
NODE_VERSION: v18
steps:
# Setup.
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
Expand All @@ -79,7 +79,7 @@ jobs:
- run: yarn dist

# Coverage.
- run: yarn coverage --no-worker-threads # https://github.com/avajs/ava/discussions/3158
- run: yarn coverage
- run: yarn coverage:report
- uses: codecov/codecov-action@v3
with:
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"clean:dist": "rimraf packages/*/dist/**",
"clean:deps": "rimraf packages/*/node_modules/**",
"clean:test": "rimraf packages/*/test/out/**",
"test": "ava packages/{core,extensions,functions,cli}/test/**/*.test.ts",
"test": "ava --no-worker-threads packages/{core,extensions,functions,cli}/test/**/*.test.ts",
"coverage": "c8 --config .github/.c8rc --reporter=lcov --reporter=text yarn test --tap",
"coverage:report": "c8 report --config .github/.c8rc --reporter=text-lcov > coverage/coverage.lcov",
"lint": "eslint \"packages/*/{src,test}/**/*.ts\"",
"validate": "scripts/validate.js",
"benchmark": "tsx test/benchmark.ts",
"preversion": "yarn run test",
"preversion": "yarn test",
"version": "yarn clean:dist && lerna run dist && yarn run docs:cli && git add -u packages/docs",
"postpublish": "git push && git push --tags && yarn run docs:deploy:prod",
"docs:cli": "export CLI_HELP=\"$(gltf-transform -h --no-editorial)\" && perl -i -0pe 's/\\Q<!-- begin:cli_help -->\\E.*\\Q<!-- end:cli_help -->\\E/<!-- begin:cli_help -->\n\\`\\`\\`plaintext$ENV{'CLI_HELP'}\\n\\`\\`\\`\n<!-- end:cli_help -->/gmsi' packages/docs/src/lib/pages/cli.md",
Expand Down Expand Up @@ -61,8 +61,7 @@
"ts": "module"
},
"nodeArguments": [
"--loader=tsx",
"--no-warnings=ExperimentalWarnings"
"--import=tsx"
]
}
}

0 comments on commit 40352f0

Please sign in to comment.