This repository has been archived by the owner on Mar 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
/
.travis.yml
64 lines (57 loc) · 1.91 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
language: node_js
node_js:
- "10"
cache:
yarn: true
directories:
- node_modules
services:
- docker
env:
- DOCKER_COMPOSE_VERSION=1.23.2
before_install:
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- yarn global add wait-on
install:
- docker build --build-arg BUILD_COMMIT=$TRAVIS_COMMIT --target production -t humanconnection/nitro-backend:latest .
- docker-compose -f docker-compose.yml -f docker-compose.travis.yml up -d
- wait-on http://localhost:7474 && docker-compose exec neo4j migrate
script:
- docker-compose exec backend yarn run lint
- docker-compose exec backend yarn run test --ci
- docker-compose exec backend yarn run db:reset
- docker-compose exec backend yarn run db:seed
- docker-compose exec backend yarn run test:cucumber
- docker-compose exec backend yarn run test:coverage
- docker-compose exec backend yarn run db:reset
- docker-compose exec backend yarn run db:seed
after_success:
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
- chmod +x send.sh
- ./send.sh success $WEBHOOK_URL
after_failure:
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
- chmod +x send.sh
- ./send.sh failure $WEBHOOK_URL
deploy:
- provider: script
script: scripts/docker_push.sh
on:
branch: master
- provider: script
script: scripts/deploy.sh nitro.human-connection.org
on:
branch: master
tags: true
- provider: script
script: scripts/deploy.sh nitro-staging.human-connection.org
on:
branch: master
- provider: script
script: scripts/deploy.sh "nitro-$TRAVIS_COMMIT.human-connection.org"
on:
tags: true
all_branches: true