-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
47 lines (43 loc) · 1.2 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
dist: trusty
sudo: required
language: node_js
cache: false
node_js:
- "6.9.5"
os:
- linux
services:
- docker
env:
global:
- DBUS_SESSION_BUS_ADDRESS=/dev/null
- DISPLAY=:99.0
- CHROME_BIN=chromium-browser
before_script:
- sh -e /etc/init.d/xvfb start
script:
- ng test --watch=false --code-coverage
# - (npm start > /dev/null &) && (npm run e2e)
- docker-compose up -d
- docker-compose ps
- docker-compose exec web npm run ng-lint
- docker-compose exec web npm run ng-build-prod
- npm run e2e -- --baseUrl="http://localhost:9090/"
- docker-compose down
after_success:
- bash <(curl -s https://codecov.io/bash)
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
- if [ "$TRAVIS_BRANCH" == "master" ]; then
docker tag angular2starter_web:latest headcult/angular2starter:master;
docker push headcult/angular2starter:master;
else if [ "$TRAVIS_BRANCH" == "dev" ]; then
docker tag angular2starter_web:latest headcult/angular2starter:dev;
docker push headcult/angular2starter:dev;
fi;
deploy:
provider: heroku
api_key:
secure: "46d1d6da-8ea5-4ac2-98ad-a09b39295587"
app:
master: angular2starter-master
dev: angular2starter-dev