-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
59 lines (54 loc) · 1004 Bytes
/
.gitlab-ci.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
52
53
54
55
56
57
58
59
image: node:latest
stages:
- build
- lints_and_tests
build:
stage: build
script:
- npm install
cache:
paths:
- node_modules/
artifacts:
expire_in: 1 days
when: on_success
paths:
- node_modules/
lint:
stage: lints_and_tests
dependencies:
- build
script:
- npm run lint
test_unit_and_integration:
stage: lints_and_tests
dependencies:
- build
script:
- npm run test:cov
artifacts:
expire_in: 1 days
when: on_success
paths:
- coverage/
test_e2e:
services:
- postgres:9.6.9
- redis:6.2.0-alpine
variables:
POSTGRES_DB: root
POSTGRES_USER: root
POSTGRES_PASSWORD: root
POSTGRES_HOST_AUTH_METHOD: trust
stage: lints_and_tests
dependencies:
- build
script:
- export REDIS_PORT=6379
- export REDIS_HOST=redis
- export PG_HOST=postgres
- export PG_PORT=root
- export PG_USER=root
- export PG_PASS=root
- export PG_DATABASE=root
- npm run test:e2e