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

Node.js 20 compatibility #93

Closed
wants to merge 15 commits into from
Closed
67 changes: 67 additions & 0 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# This is a composition of lint and test scripts
# Make sure to update this file along with the others

name: Test and Release

# Run this job on all pushes and pull requests
# as well as tags with a semantic version
on:
push:
branches:
- '*'
tags:
# normal versions
- "v?[0-9]+.[0-9]+.[0-9]+"
# pre-releases
- "v?[0-9]+.[0-9]+.[0-9]+-**"
pull_request: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# Performs quick checks before the expensive test runs
check-and-lint:
if: contains(github.event.head_commit.message, '[skip ci]') == false

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install Dependencies
run: npm install

# Runs adapter tests on all supported node versions and OSes
adapter-tests:
if: contains(github.event.head_commit.message, '[skip ci]') == false

needs: [check-and-lint]

runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [8.x, 10.x, 12.x, 14.x, 16.x, 18.x, 20.x]
os: [ubuntu-latest, windows-latest, windows-2019, macos-latest]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install Dependencies
run: npm install

- name: Run local tests
run: npm test
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,19 @@
"name": "Mathias Küsel"
},
"engines": {
"node": ">=4"
"node": ">=8"
},
"license": "MIT",
"readmeFilename": "README.md",
"dependencies": {
"nan": "~2.14.1",
"nan": "~2.18.0",
"node-gyp": "^10.0.1",
"bindings": "~1.5.0",
"prebuild-install": "^6.1.2"
"prebuild-install": "^7.1.1"
},
"devDependencies": {
"prebuild": "^10.0.0",
"prebuild-ci": "^3.1.0"
"prebuild": "^12.1.0",
"prebuild-ci": "^4.0.0"
},
"scripts": {
"install": "prebuild-install || node-gyp rebuild",
Expand Down