-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 1014 Bytes
/
build.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
name: build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
# See https://docs.github.com/en/actions/using-containerized-services/creating-postgresql-service-containers#running-jobs-directly-on-the-runner-machine
services:
postgres:
# Docker Hub image
image: postgres
env:
POSTGRES_PASSWORD: S3cret
POSTGRES_USER: user
POSTGRES_DB: authorization_db
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install dependencies
run: npm ci
- name: Setup env
run: cp .env.example .env
- name: Run migrations and populate with dummy data
run: npm run dev-db
- name: Run integration tests
run: npm t