-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update GitHub Actions and test with older SQLite versions on older No…
…des.
- Loading branch information
Showing
1 changed file
with
83 additions
and
21 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,94 @@ | ||
name: Tests on Node.js | ||
on: [push, pull_request] | ||
"on": [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
name: "Node.js v${{matrix.node}}" | ||
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 | ||
|
||
strategy: | ||
matrix: | ||
node: | ||
versions: | ||
# Mapbox SQLite3 v5 depends on Node >= v10, but works on v8, too. | ||
# Better SQLite3 v6 depends on Node >= v8 and < 16. | ||
- "8" | ||
- "9" | ||
- "10" | ||
- "11" | ||
- "12" | ||
- "13" | ||
- "14" | ||
- "15" | ||
- "16" | ||
- "17" | ||
- "18" | ||
- "19" | ||
- "20" | ||
- node: "8" | ||
mapbox-sqlite3: "4" | ||
better-sqlite3: "6" | ||
|
||
- node: "8" | ||
better-sqlite3: "6" | ||
|
||
# Better SQLite v6 on Node v9 requires Python 2, which isn't | ||
# available on GitHub Actions. | ||
|
||
# Better SQLite3 v7 depends on Node >= 10. | ||
- node: "10" | ||
better-sqlite3: "7" | ||
|
||
- node: "11" | ||
better-sqlite3: "7" | ||
|
||
- node: "12" | ||
better-sqlite3: "7" | ||
|
||
- node: "13" | ||
better-sqlite3: "7" | ||
|
||
# Better SQLite3 v8 depends on Node >= 14. | ||
- node: "14" | ||
better-sqlite3: "6" | ||
|
||
- node: "14" | ||
|
||
- node: "15" | ||
|
||
- node: "16" | ||
|
||
- node: "17" | ||
|
||
- node: "18" | ||
|
||
- node: "19" | ||
|
||
- node: "20" | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: {node-version: "${{matrix.node}}"} | ||
- run: npm install | ||
- run: make spec | ||
- 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 | ||
|
||
- name: Install Mapbox SQLite3 v${{matrix.versions.mapbox-sqlite3 || '?'}} | ||
if: ${{matrix.versions.mapbox-sqlite3}} | ||
run: > | ||
npm install --ignore-scripts | ||
sqlite3@${{matrix.versions.mapbox-sqlite3}} | ||
- name: Install Better SQLite3 v${{matrix.versions.better-sqlite3 || '?'}} | ||
if: ${{matrix.versions.better-sqlite3}} | ||
run: > | ||
npm install --ignore-scripts | ||
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 |