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 Node 23 npm tests #194

Merged
merged 6 commits into from
Jan 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions .github/workflows/test-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,18 @@ jobs:
npm install
- name: Install from npm
run: npm install --force gdal-async@${{ github.event.inputs.version }}
- name: Node options
shell: bash
run: echo 'MOCHA_NODE_OPTIONS=--v8-expose-gc' >> $GITHUB_ENV
if: matrix.node-version != '23.x'
- name: Node options
shell: bash
run: echo 'MOCHA_NODE_OPTIONS=--node-option=no-experimental-strip-types --node-option=expose-gc' >> $GITHUB_ENV
if: matrix.node-version == '23.x'
- name: Run the unit tests
run: |
cd test
npx mocha --reporter=tap -r ts-node/register -r _common.ts -r _hooks.ts --timeout 20000 --v8-expose-gc *.test.ts
npx mocha ${{ env.MOCHA_NODE_OPTIONS }} --reporter=tap -r ts-node/register -r _common.ts -r _hooks.ts --timeout 20000 *.test.ts
env:
TS_NODE_PROJECT: tsconfig.test.json

Expand Down Expand Up @@ -78,9 +86,17 @@ jobs:
npm install
- name: Rebuild with npm
run: npm install --verbose --force gdal-async@${{ github.event.inputs.version }} --build-from-source
- name: Node options
shell: bash
run: echo 'MOCHA_NODE_OPTIONS=--v8-expose-gc' >> $GITHUB_ENV
if: matrix.node-version != '23.x'
- name: Node options
shell: bash
run: echo 'MOCHA_NODE_OPTIONS=--node-option=no-experimental-strip-types --node-option=expose-gc' >> $GITHUB_ENV
if: matrix.node-version == '23.x'
- name: Run the unit tests
run: |
cd test
npx mocha --reporter=tap -r ts-node/register -r _common.ts -r _hooks.ts --timeout 20000 --v8-expose-gc *.test.ts
npx mocha ${{ env.MOCHA_NODE_OPTIONS }} --reporter=tap -r ts-node/register -r _common.ts -r _hooks.ts --timeout 20000 *.test.ts
env:
TS_NODE_PROJECT: tsconfig.test.json
Loading