-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (45 loc) · 1.33 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
# .github/workflows/test.yaml
name: build / migrate/ tests
on: push
jobs:
test:
runs-on: ubuntu-latest
# Service containers to run with `container-job`
services:
# Label used to access the service container
postgres:
# Docker Hub PostgreSQL image
image: postgres
# Provide the password for postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/veritext_box_test
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.12.1'
cache: 'yarn'
cache-dependency-path: 'yarn.lock'
- name: Run setup script
run: yarn setup:ci
- name: Run prisma deploy
run: yarn db:migrate:prod
- name: Run tests
run: yarn test
- name: Verify formatting
uses: creyD/[email protected]
with:
# fail if there are unformatted files
dry: true
prettier_options: --write **/*.{js,jsx,scss,json,md}