-
Notifications
You must be signed in to change notification settings - Fork 182
58 lines (51 loc) · 1.46 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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: test (node ${{ matrix.node }}, mongodb ${{ matrix.mongo }})
runs-on: ubuntu-20.04
strategy:
fail-fast: false
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 &
- name: Wait for dashboard to respond
uses: iFaxity/[email protected]
with:
resource: http://localhost:4000
delay: 1000
timeout: 30000
log: true
- run: NODE_ENV=test npm test