Skip to content

Commit 333e125

Browse files
committed
Update github workflows
1 parent ed5e3c9 commit 333e125

File tree

5 files changed

+66
-121
lines changed

5 files changed

+66
-121
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 67 deletions
This file was deleted.

.github/workflows/node.js.yml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,34 @@
1-
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3-
41
name: Node.js CI
52

63
on:
74
push:
8-
branches: [ master ]
5+
branches: [master]
96
pull_request:
10-
branches: [ master ]
7+
branches: [master]
8+
workflow_dispatch:
119

1210
jobs:
1311
build:
14-
1512
runs-on: ubuntu-latest
1613

1714
strategy:
1815
matrix:
19-
node-version: [10.x, 12.x, 14.x]
16+
node-version: [10.x, 12.x, 14.x, 20.x, 22.x]
2017

2118
steps:
22-
- uses: actions/checkout@v2
23-
- name: Use Node.js ${{ matrix.node-version }}
24-
uses: actions/setup-node@v1
25-
with:
26-
node-version: ${{ matrix.node-version }}
27-
- run: npm ci
28-
- run: npm run build --if-present
29-
- run: npm test
19+
- uses: actions/checkout@v4
20+
21+
- name: Use Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
cache: "npm"
26+
27+
- name: Install dependencies
28+
run: npm ci
29+
30+
- name: Build
31+
run: npm run build --if-present
32+
33+
- name: Run tests
34+
run: npm test

lib/tools/net/http.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ module.exports = (url, options, clientReq, clientRes, callback) => {
3838
: clientRes.writableEnded;
3939

4040
if (!writableEnded) {
41-
clientRes.writeHead(502);
41+
if (!clientRes.headersSent) {
42+
clientRes.writeHead(502);
43+
}
4244
clientRes.end();
4345
}
4446

0 commit comments

Comments
 (0)