Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix broken ci by skipping tests if node v > 18.19.0 #5195

Merged
merged 3 commits into from
Dec 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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