-
Notifications
You must be signed in to change notification settings - Fork 21
51 lines (45 loc) · 1.14 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
name: Test
on: push
jobs:
build-and-test:
env:
DATABASE_URL: 'postgresql://prisma:prisma@localhost/tests'
NODE_OPTIONS: '--max-old-space-size=4096'
services:
postgres:
image: postgres:12
env:
POSTGRES_USER: prisma
POSTGRES_PASSWORD: prisma
POSTGRES_DB: tests
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 1s
--health-timeout 1s
--health-retries 60
ports:
- 5432:5432
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
# Build
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: '18'
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build backend
run: pnpm build:ci
- name: Lint
run: pnpm lint
- name: Tests
run: pnpm test:ci
- name: Build web
run: pnpm build:web