-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.07 KB
/
main.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
name: QA For my-api-template project
on: push
jobs:
# Label of the container job
main:
runs-on: ubuntu-latest
container: node:lts
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Install dependencies
run: npm ci
- name: Run static analysis
run: npm run lint -s
- name: Initialize Schema
run: npm run init-db
env:
DB_HOST: postgres
PG_DB: postgres
PG_PORT: 5432
PG_USER: postgres
PG_PASSWORD: postgres
SESSION_SECRET: somesecret
- name: Run Tests
run: npm test
env:
DB_HOST: postgres
PG_DB: postgres
PG_PORT: 5432
PG_USER: postgres
PG_PASSWORD: postgres
SESSION_SECRET: somesecret