This repository was archived by the owner on Apr 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
94 lines (87 loc) · 2.04 KB
/
.travis.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
language: node_js
cache:
directories:
- 'node_modules'
env:
global:
# Application
- BASE_URL=http://127.0.0.1:3000
- PORT=3000
# Authentication
- GITHUB_LOGIN_ENABLED=true
- GITHUB_CLIENT_ID=RANDOM_ID
- GITHUB_CLIENT_SECRET=RANDOM_SECRET
- JWT_SECRET=SUPER_SECRET_TRAVIS_KEY
# Database
- TYPEORM_CONNECTION=mysql
- TYPEORM_HOST=localhost
- TYPEORM_DATABASE=bounty_test
- TYPEORM_USERNAME=root
- TYPEORM_PASSWORD=
jobs:
include:
- stage: linter
node_js: 12.14.1
install:
- npm ci
script:
- npm run lint -- --quiet
- stage: docker
name: production
services:
- docker
install: skip
script:
- >
docker-compose
-f docker-compose.yml
build
- stage: docker
name: development
services:
- docker
install: skip
script:
- >
docker-compose
-f docker-compose.yml
-f docker-compose.dev.yml
build
- stage: test
name: e2e
node_js: 12.14.1
addons:
mariadb: '10.3'
before_install:
- mysql -e 'CREATE DATABASE IF NOT EXISTS bounty_test;'
install:
- npm ci
before_script:
- >
TYPEORM_MIGRATIONS=src/migration/*.ts
npm run typeorm -- migration:run
- >
TYPEORM_MIGRATIONS=test/populate/*.ts
npm run typeorm -- migration:run
script:
- npm run test:e2e
- stage: test
name: coverage
node_js: 12.14.1
addons:
mariadb: '10.3'
before_install:
- mysql -e 'CREATE DATABASE IF NOT EXISTS bounty_test;'
install:
- npm ci
before_script:
- >
TYPEORM_MIGRATIONS=src/migration/*.ts
npm run typeorm -- migration:run
- >
TYPEORM_MIGRATIONS=test/populate/*.ts
npm run typeorm -- migration:run
script:
- npm run test:cov
after_success:
- codecov