forked from metarhia/Example
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (41 loc) · 1.1 KB
/
test.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
name: Testing CI
on:
- pull_request
- push # not for landing
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node:
- 16
- 18
- 19
- 20
os:
- ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Start db docker containers
run: |
docker-compose -f test-db-docker-compose.yml up -d
sleep 10 # wait for database to be ready
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm test
- name: Prepearing api docker container for integration tests
run: |
docker-compose -f test-api-docker-compose.yml up -d
- name: Client test
run: |
node --test test/client.js
node --test test/system.js