-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
26 lines (26 loc) · 886 Bytes
/
.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
sudo: required
services:
- docker
language: python
python:
- "3.6"
before_install:
- docker build -t blgo/flask-realtime-restapi .
- docker network create -d bridge my-bridge-network
- docker run --network-alias=db --network=my-bridge-network --name mongo -d mongo:3.6.2
- echo "waiting 15 seconds to allow mongo database to startup"; sleep 15
- docker run -e MONGODB_NETWORK_ALIAS=db --network=my-bridge-network --name realtimeapp -p 80:80 -d blgo/flask-realtime-restapi
- docker ps -a
# command to install dependencies
install:
- pip install -r requirements.txt
- pip install nose
# Run tests
script:
- nosetests
- python tests/integration.py
after_success:
- if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD";
docker push blgo/flask-realtime-restapi;
fi