Skip to content

Commit

Permalink
ci: fix broken ci by skipping tests if node v > 18.19.0 (#5195)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak committed Dec 10, 2023
1 parent 6dcd4b6 commit e9764f3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:

strategy:
matrix:
node-version: [14, 16, '18.18.2', 20]
node-version: [14, 16, 18, 20]
os: [macos-latest, ubuntu-latest, windows-latest]
exclude:
# excludes node 14 on Windows
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

strategy:
matrix:
node-version: [16, '18.18.2', 20]
node-version: [16, 18, 20]
os: [ubuntu-latest]
pnpm-version: [8]
# pnpm@8 does not support Node.js 14 so include it separately
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/package-manager-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
# Maintenance and active LTS
node-version: [16, '18.18.2', 20]
node-version: [16, 18, 20]
os: [ubuntu-latest]
pnpm-version: [8]
# pnpm@8 does not support Node.js 14 so include it separately
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
strategy:
matrix:
# Maintenance and active LTS
node-version: [14, 16, '18.18.2', 20]
node-version: [14, 16, 18, 20]
os: [ubuntu-latest]

steps:
Expand Down
8 changes: 4 additions & 4 deletions test/close-pipelining.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ test('Should return 503 while closing - pipelining', async t => {
await instance.close()
})

const isVgte19 = semver.gte(process.version, '19.0.0')
test('Should not return 503 while closing - pipelining - return503OnClosing: false, skip Node >= v19.x', { skip: isVgte19 }, async t => {
const isNodeVersionGte1819 = semver.gte(process.version, '18.19.0')
test('Should not return 503 while closing - pipelining - return503OnClosing: false, skip Node >= v18.19.x', { skip: isNodeVersionGte1819 }, async t => {
const fastify = Fastify({
return503OnClosing: false,
forceCloseConnections: false
Expand Down Expand Up @@ -67,8 +67,8 @@ test('Should not return 503 while closing - pipelining - return503OnClosing: fal
await instance.close()
})

test('Should close the socket abruptly - pipelining - return503OnClosing: false, skip Node < v19.x', { skip: !isVgte19 }, async t => {
// Since Node v19, we will always invoke server.closeIdleConnections()
test('Should close the socket abruptly - pipelining - return503OnClosing: false, skip Node < v18.19.x', { skip: !isNodeVersionGte1819 }, async t => {
// Since Node v18, we will always invoke server.closeIdleConnections()
// therefore our socket will be closed
const fastify = Fastify({
return503OnClosing: false,
Expand Down
6 changes: 3 additions & 3 deletions test/close.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ test('Should return error while closing (callback) - injection', t => {
})
})

const isV19plus = semver.gte(process.version, '19.0.0')
test('Current opened connection should continue to work after closing and return "connection: close" header - return503OnClosing: false, skip Node >= v19.x', { skip: isV19plus }, t => {
const isNodeVersionGte1819 = semver.gte(process.version, '18.19.0')
test('Current opened connection should continue to work after closing and return "connection: close" header - return503OnClosing: false, skip Node >= v18.19.x', { skip: isNodeVersionGte1819 }, t => {
const fastify = Fastify({
return503OnClosing: false,
forceCloseConnections: false
Expand Down Expand Up @@ -243,7 +243,7 @@ test('Current opened connection should continue to work after closing and return
})
})

test('Current opened connection should NOT continue to work after closing and return "connection: close" header - return503OnClosing: false, skip Node < v19.x', { skip: !isV19plus }, t => {
test('Current opened connection should NOT continue to work after closing and return "connection: close" header - return503OnClosing: false, skip Node < v18.19.x', { skip: !isNodeVersionGte1819 }, t => {
t.plan(4)
const fastify = Fastify({
return503OnClosing: false,
Expand Down

0 comments on commit e9764f3

Please sign in to comment.