-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (62 loc) · 1.5 KB
/
test.yaml
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
59
60
61
62
63
64
name: Test
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: "postgres"
POSTGRES_DB: testdb
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis
ports:
- 6379:6379
options: --entrypoint redis-server
strategy:
matrix:
node-version: [12.x, 13.x, 14.x, 15.x, 16.x,17.x,18.x,19.x,20.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- name: Run Migrations
env:
PORT: 3000
dbport: 5432
user: postgres
password: "postgres"
host: localhost
database: testdb
REDIS_URL: redis
REDIS_PORT: 6379
REDIS_HOST_PASSWORD: redis
run: npm run migrate
- name: Run Tests
env:
PORT: 3000
dbport: 5432
user: postgres
password: "postgres"
host: localhost
database: testdb
REDIS_URL: redis
REDIS_PORT: 6379
REDIS_HOST_PASSWORD: redis
run: npm test