Skip to content

Commit

Permalink
Add Node 21 to leak tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Oct 25, 2023
1 parent 68ac24c commit 02f0516
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,22 @@ jobs:
- 8888:80
strategy:
matrix:
node-version: [18]
node-version: [18, 21]
fail-fast: false
steps:
- name: Checkout Master
uses: actions/checkout@v4
- if: matrix.node-version > 18
name: Install Required Libraries
run: sudo apt update && sudo apt install -y libcurl4-openssl-dev libssl-dev
- name: Use Node
uses: actions/setup-node@master
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- if: matrix.node-version > 21
name: Remove node-libcurl and uWS
run: node scripts/remove-node-libcurl-uws.js
- name: Setup env
uses: the-guild-org/shared-config/setup@main
with:
Expand Down
9 changes: 9 additions & 0 deletions scripts/remove-node-libcurl-uws.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const fs = require('fs');

const serverPackageJson = JSON.parse(fs.readFileSync('./packages/server/package.json', 'utf8'));
serverPackageJson.devDependencies['uWebSockets.js'] = undefined;
fs.writeFileSync('./packages/server/package.json', JSON.stringify(serverPackageJson, null, 2));

const nodeFetchPackageJson = JSON.parse(fs.readFileSync('./packages/node-fetch/package.json', 'utf8'));
nodeFetchPackageJson.devDependencies['node-libcurl'] = undefined;
fs.writeFileSync('./packages/node-fetch/package.json', JSON.stringify(nodeFetchPackageJson, null, 2));

0 comments on commit 02f0516

Please sign in to comment.