From d4080b2c5eb0bceb531a56e898551e1e5e8db5e0 Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Mon, 2 Dec 2024 17:37:48 +0800 Subject: [PATCH] test: run Node.js 16 tests case --- .github/workflows/nodejs-16.yml | 23 +++++++++++++++++++++++ package.json | 1 + 2 files changed, 24 insertions(+) create mode 100644 .github/workflows/nodejs-16.yml diff --git a/.github/workflows/nodejs-16.yml b/.github/workflows/nodejs-16.yml new file mode 100644 index 00000000..a1c31fa1 --- /dev/null +++ b/.github/workflows/nodejs-16.yml @@ -0,0 +1,23 @@ +name: Node.js 16 CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: '16.x' + - run: npm install + - run: npm run prepublishOnly + - run: node -v + - run: npm run test-node16 diff --git a/package.json b/package.json index 5aec75f3..f1a55ba6 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "test-tsc:esm": "cd test/fixtures/ts-esm && rm -rf node_modules && npm link ../../.. && npm run build", "test": "npm run lint && vitest run", "test-keepalive": "cross-env TEST_KEEPALIVE_COUNT=50 vitest run --test-timeout 180000 keep-alive-header.test.ts", + "test-node16": "node examples/httpclient.cjs && node examples/search_github.cjs && node examples/timing.cjs", "cov": "vitest run --coverage", "ci": "npm run lint && npm run cov && npm run prepublishOnly && npm pack && attw --pack", "clean": "rm -rf dist",