-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
51 lines (42 loc) · 1.06 KB
/
.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
image: node:latest
services:
- postgres:latest
variables:
# Configure postgres service (https://hub.docker.com/_/postgres/)
POSTGRES_HOST: postgres
POSTGRES_DB: custom_db
POSTGRES_USER: custom_user
POSTGRES_PASSWORD: custom_pass
before_script:
- export TYPEORM_CONNECTION=postgres
- export TYPEORM_HOST=$POSTGRES_HOST
- export TYPEORM_USERNAME=$POSTGRES_USER
- export TYPEORM_PASSWORD=$POSTGRES_PASSWORD
- export TYPEORM_DATABASE_TEST=$POSTGRES_DB
- export TYPEORM_PORT=5432
- export TYPEORM_SYNCHRONIZE=true
- export TYPEORM_LOGGING=true
- export TYPEORM_ENTITIES=src/**/**.entity{.ts,.js}
- export TYPEORM_MIGRATIONS_TABLE_NAME=custom_migration_table
- export TYPEORM_MIGRATIONS=./migration/*.ts
# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:
paths:
- node_modules/
stages:
- build
- test
- deploy
install_dependencies:
stage: build
script:
- npm install
unit_tests:
stage: test
script:
- npm run test:cov
e2e_tests:
stage: test
script:
- npm run test:e2e