Fix tests, test more, support Node 16-20 #73
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
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 12 | |
- run: npm ci | |
- run: npm run lint | |
test: | |
name: Testing with Node ${{ matrix.node }}, MongoDB ${{ matrix.mongo }} | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
node: [12, 14, 16, 18, 20] | |
mongo: [latest] | |
include: | |
- { node: 12, mongo: 6.0.11 } | |
- { node: 12, mongo: 5.0.22 } | |
- { node: 12, mongo: 4.4.25 } | |
- { node: 12, mongo: 3.6.23 } | |
- { node: 12, mongo: 2.6.12 } | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- run: npm ci | |
- name: Supply MongoDB ${{ matrix.mongo }} | |
uses: supercharge/[email protected] | |
with: | |
mongodb-version: ${{ matrix.mongo }} | |
- name: Supply integration test configuration file | |
run: cp config/test.sample.json config/test.json | |
- name: Make dashboard available to be integration-tested | |
run: NODE_ENV=test node index.js & | |
- run: sleep 10s | |
- run: npm test |