This repository has been archived by the owner on Dec 3, 2024. It is now read-only.
Let’s demonstrate that Node.js 16 pass the tests #30
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Recommendations: | |
# * Do not run `npm test` | |
# * macOS and Ubuntu: Node.js v20.x and Python 3.12 | |
# * Windows: Node.js v16.x and Python 3.11 -- Do not run `node-gyp rebuild` | |
# | |
# Lessons learned: | |
# 1. Node.js >= v21 fails | |
# 2. Node.js >= 18 fails on Windows | |
# 3. Python >= 3.12 fails on Node.js 16 because of distlib fixed in node-gyp v10.0 | |
# 4. `npm test` fails with: npm ERR! Missing script: "test" | |
# 5. `node-gyp rebuild` fails on Node.js 16 | |
name: CI | |
on: [push, pull_request] | |
jobs: | |
build_and_test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [18.x, 20.x] # , latest] Node.js >= 21 fails | |
os: [ubuntu-latest, macos-latest] | |
include: # Node.js > 16.x fails on Windows | |
- node-version: 16.x | |
os: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: # Python >= 3.12 fails on Node.js 16 because of distlib fixed in node-gyp v10.0 | |
python-version: 3.11 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: | | |
node-gyp --version || true | |
npm install --global node-gyp | |
node-gyp --version | |
shell: bash | |
- run: | | |
npm install | |
npm test || true # npm ERR! Missing script: "test" | |
shell: bash | |
- run: node-gyp configure | |
shell: bash | |
- if: matrix.node-version != '16.x' | |
run: node-gyp rebuild | |
shell: bash | |