Skip to content

Commit 49473eb

Browse files
committed
chore: expand the CI matrix
1 parent 0b3bded commit 49473eb

File tree

5 files changed

+1145
-3
lines changed

5 files changed

+1145
-3
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Validate code
2+
on: [push, pull_request]
3+
permissions: { contents: read, packages: read }
4+
5+
jobs:
6+
testOldNode:
7+
runs-on: ubuntu-latest
8+
timeout-minutes: 2
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
node-version:
13+
- "18.13" # first version we support
14+
- "20.0" # earliest in 20x LTS
15+
- "20.x" # latest in 20x LTS
16+
- "22.0" # before native TS support
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
24+
- name: ⏬ Install dependencies
25+
run: yarn install && yarn add -D tsx
26+
27+
- name: ✅ Run tests
28+
run: node --loader=tsx/esm --test __tests__/**/*.test.ts >> $GITHUB_STEP_SUMMARY
29+
30+
- name: 🏗 Run build
31+
run: yarn build
32+

.github/workflows/validate.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
node-version: ["22.x", "23.x"]
13-
12+
node-version:
13+
- "22.6" # supports --experimental-strip-types
14+
- "22.x" # latest LTS
15+
- "23.x" # Latest current
16+
1417
steps:
1518
- uses: actions/checkout@v4
1619
- uses: actions/setup-node@v4

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ s.listen(8989);
2626

2727

2828
# Gotchas
29-
* Must use Node.js `^18.13.0 || ^19.3.0` because of important changes [ref1](https://github.com/nodejs/node/pull/45672), [ref2](https://github.com/nodejs/node/pull/45642), [ref3](https://github.com/nodejs/node/issues/42694), [ref4](https://github.com/nodejs/node/issues/44188)
29+
* Must use Node.js `^18.13.0 || ^19.3.0 || >=20.0` because of important changes [ref1](https://github.com/nodejs/node/pull/45672), [ref2](https://github.com/nodejs/node/pull/45642), [ref3](https://github.com/nodejs/node/issues/42694), [ref4](https://github.com/nodejs/node/issues/44188)
3030
* In case there are multiple listeners installed, the first one to return a `Response` will "win" - that `Response` will be sent to the user. Note that this does not mean the first handler _mounted_ or the first one to be _called_ - some handlers can be slower than others. The first one to finish executing and returning a Response will win, regardless of when it was mounted.
3131

3232
## TODOs

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"@types/ws": "^8.5.13",
77
"got": "^14.4.5",
88
"prettier": "^3.4.2",
9+
"tsx": "^4.19.2",
910
"typescript": "^5.7.3",
1011
"ws": "^8.18.0"
1112
},

0 commit comments

Comments
 (0)