Add support for Node v22.5's experimental SQLite. #45
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
name: Tests on Node.js | |
"on": [push, pull_request] | |
jobs: | |
test: | |
name: > | |
Node.js v${{matrix.versions.node}}${{ | |
matrix.versions.mapbox-sqlite3 && | |
format(', Mapbox SQLite v{0}', matrix.versions.mapbox-sqlite3) | |
}}${{ | |
matrix.versions.better-sqlite3 && | |
format(', Better SQLite v{0}', matrix.versions.better-sqlite3) | |
}} | |
runs-on: ubuntu-latest | |
continue-on-error: ${{!!matrix.versions.flaky}} | |
strategy: | |
matrix: | |
# Mapbox SQLite3: | |
# v4 works even on v20. | |
# v5 depends on Node >= v10, but works on v8, too. | |
# | |
# Better SQLite3: | |
# v6 depends on Node >= v8 and <= 15. | |
# v7 depends on Node >= 10, <= 18. | |
# v8 depends on Node >= 14. | |
# v9 depends on Node >= 14. | |
# v10 depends on Node >= 14. | |
# v11 depends on Node >= 22. | |
versions: | |
- node: "8" | |
mapbox-sqlite3: "4" | |
better-sqlite3: "6" | |
- node: "8" | |
better-sqlite3: "6" | |
flaky: true | |
# Better SQLite v6 on Node v9 requires Python 2, which isn't | |
# available on GitHub Actions. | |
- node: "10" | |
better-sqlite3: "7" | |
# Better SQLite v7 on Node v11 requires Python 2, which isn't | |
# available on GitHub Actions. | |
- node: "12" | |
better-sqlite3: "7" | |
- node: "13" | |
better-sqlite3: "7" | |
- node: "14" | |
better-sqlite3: "10" | |
- node: "15" | |
better-sqlite3: "6" | |
- node: "15" | |
better-sqlite3: "10" | |
- node: "16" | |
better-sqlite3: "10" | |
- node: "17" | |
better-sqlite3: "10" | |
- node: "18" | |
better-sqlite3: "7" | |
- node: "18" | |
better-sqlite3: "10" | |
- node: "19" | |
better-sqlite3: "10" | |
- node: "20" | |
mapbox-sqlite3: "4" | |
better-sqlite3: "10" | |
- node: "21" | |
better-sqlite3: "10" | |
- node: "22" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Node.js v${{matrix.versions.node}} | |
uses: actions/setup-node@v3 | |
with: {node-version: "${{matrix.versions.node}}"} | |
- name: Install NPMs | |
run: npm install --ignore-scripts --no-package-lock | |
- name: Install Mapbox SQLite3 v${{matrix.versions.mapbox-sqlite3 || '?'}} | |
if: matrix.versions.mapbox-sqlite3 | |
run: > | |
npm install --ignore-scripts --no-package-lock | |
sqlite3@${{matrix.versions.mapbox-sqlite3}} | |
- name: Install Better SQLite3 v${{matrix.versions.better-sqlite3 || '?'}} | |
if: matrix.versions.better-sqlite3 | |
run: > | |
npm install --ignore-scripts --no-package-lock | |
better-sqlite3@${{matrix.versions.better-sqlite3}} | |
- name: List NPMs | |
run: npm ls sqlite3 better-sqlite3 | |
- name: Compile SQLites | |
run: npm rebuild | |
- name: Run tests | |
run: make spec |