forked from nirdizati-research/predict-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
52 lines (50 loc) · 1.61 KB
/
Copy path.travis.yml
File metadata and controls
52 lines (50 loc) · 1.61 KB
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
git:
depth: 1
env:
global:
- REDIS_HOST=localhost REDIS_PORT=6379
jobs:
include:
- language: python
python: '3.6'
cache: pip
env:
- DB_USER=postgres
- DB_PASSWORD=""
- DB_NAME=travis_ci_test
- DB_HOST=localhost
services:
- redis-server
- postgresql
install:
- pip install -r requirements.txt
- pip install git+git://github.com/scikit-multiflow/scikit-multiflow.git#egg=scikit-multiflow
- pip install codecov
before_script:
- psql -c 'create database travis_ci_test;' -U postgres
script:
- python manage.py makemigrations
- python manage.py test
- coverage run --source=. manage.py test
after_success:
- codecov
- stage: before_deploy
if: repo = nirdizati-research/predict-python AND branch = master AND type = push
language: minimal
name: Build Docker image and push to Docker Hub registry
services: docker
script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker build -t nirdizatiresearch/predict-python:$TRAVIS_COMMIT .
- docker build -t nirdizatiresearch/predict-python .
- docker push nirdizatiresearch/predict-python:$TRAVIS_COMMIT
- docker push nirdizatiresearch/predict-python
- stage: deploy
if: repo = nirdizati-research/predict-python AND branch = master AND type = push
dist: xenial
name: Server deployment
language: minimal
deploy:
provider: script
skip_cleanup: true
script: bash deploy.sh