forked from climbjios-sg/climbjios-app
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (39 loc) · 974 Bytes
/
ci-test.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
name: ci-test
on:
pull_request:
push:
branches:
- main
- dev
jobs:
test:
name: Test
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v2-beta
with:
node-version: '16'
- name: Install dependencies
run: cd backend; yarn -v; yarn policies set-version; yarn -v; yarn install --frozen-lockfile;
- name: Run tests
run: cd backend; yarn test:e2e --force-exit;
env:
DATABASE_USER: postgres
DATABASE_PASSWORD: postgres
DATABASE_PORT: 5432