forked from aeternity/dex-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (42 loc) · 1012 Bytes
/
tests.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
name: Dex Backend Tests Pipeline
on:
push:
branches:
- main
tags:
- 'v*'
pull_request: {}
jobs:
main:
runs-on: ubuntu-latest
name: Dex backend tests
services:
postgres:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: 12345
POSTGRES_USER: postgres
POSTGRES_DB: postgres
POSTGRES_SCHEMA: test
POSTGRES_HOST_PORT: 5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 100
- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: npm install
run: npm ci
- name: unit test
run: npm run test
- name: e2e test
run: npm run pretest:e2e && npm run test:e2e