-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
44 lines (37 loc) · 1.13 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
language: node_js
node_js:
- "10"
cache:
yarn: true
directories:
- node_modules
services:
# we need docker for building the image and mongo for testing
- 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
install:
- docker build -t humanconnection/embed-api:latest .
- docker-compose -f docker-compose.yml up -d # some of the tests need mongodb
script:
- docker-compose exec embed-api yarn run lint
- docker-compose exec embed-api yarn run mocha
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
tags: true