-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (37 loc) · 1 KB
/
backend-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
name: backend-test
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
env:
DATABASE_URL: postgresql://test:test@localhost:5432/test?schema=public
jobs:
make-backend-test:
timeout-minutes: 10
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: test
ports:
- 5432:5432
steps:
- name: checkout git repository
uses: actions/checkout@v3
- name: cache backend node-modules
id: cache-backend-node-modules
uses: actions/cache@v3
with:
path: backend/node_modules
key: cache-backend-node-modules-${{ hashFiles('backend/package-lock.json') }}
- name: backend npm install
run: cd backend && npm install
- name: set up prisma
run: cd backend && npx prisma db push && npx prisma generate
- name: backend test
run: cd backend && make test