Skip to content

Commit 104664d

Browse files
authored
test: run Node.js 16 tests case (#551)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new GitHub Actions workflow for automated continuous integration in a Node.js 16 environment. - Added a new testing script for Node.js 16 to enhance testing capabilities. - **Chores** - Updated `package.json` to include the new `"test-node16"` script for executing example Node.js scripts. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent eba0c51 commit 104664d

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.github/workflows/nodejs-16.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Node.js 16 CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Use Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '16.x'
20+
- run: npm install
21+
- run: npm run prepublishOnly
22+
- run: node -v
23+
- run: npm run test-node16

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"test-tsc:esm": "cd test/fixtures/ts-esm && rm -rf node_modules && npm link ../../.. && npm run build",
3939
"test": "npm run lint && vitest run",
4040
"test-keepalive": "cross-env TEST_KEEPALIVE_COUNT=50 vitest run --test-timeout 180000 keep-alive-header.test.ts",
41+
"test-node16": "node examples/httpclient.cjs && node examples/search_github.cjs && node examples/timing.cjs",
4142
"cov": "vitest run --coverage",
4243
"ci": "npm run lint && npm run cov && npm run prepublishOnly && npm pack && attw --pack",
4344
"clean": "rm -rf dist",

0 commit comments

Comments
 (0)