-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
64 lines (53 loc) · 1.97 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
# Source language
language: python
# Building OS
os:
- linux
# Python versions
python:
- "3.6"
# Add docker support to travis build
services:
- docker
# Use cache on pip
cache:
pip: true
directories:
- ${HOME}/.sonar/cache
# Build only following branches
branches:
only:
- master
- develop
# Tags like 1.0.0 or 1.0.0-rev4
- /^\d+\.\d+\.\d+(\-.+)?$/
# Add sonarcloud addon
addons:
sonarcloud:
organization: "jtorregrosa-github"
token:
secure: Ohejy/ei3KujfESOl7Q9dK3FCmJQXE53WlpxBMy0nS/EBTn7BzItigom0Qwi1dhmf9naFNILvAamu2B49Z7Fnm432BooHx863yiby51/l4B0HoYENtco2kOOZLZZRmFP3niYoK9IPs8d1l8ubMsOcVNnokGzme4Jv52D4QY7NdRkO3w6GGsizOS92xeIvByrArar833YOtsZljbiCVY7p7EPYOmlSeiikjzzIaoLxF+EhlCmLHmRYSb5nWe91PhhDAVg5sj9UjLW12fF0yngyx/gWs8/FPyFduU5vZ0NLjM5xg/B0AsVZUReW7mCn95FYRsU1Qf68omgZkhfxMTYLIvor9/fdeGNxbmCQtSr+zLc+AMrsXqwYvYgrf0B8gcyUgJdiOATpPQ8M2g1xf9KN0aNbHXdyKPgrQpiW6Jf1BeR0jGBnPoqI7kee5ThGe+9eeLWqwl9MMq3edQ3FDhxpI38YSLZ1Dz1mRH82EMfsnKS2eXcRe11Je9NM0nRCdxftZU92lJy5pQHGdDXooVJlXCrX3dLv9zB1LfOVT+1cq0cy59N5Il1jK/UtstUp3LpEZmAqfCs4jmdR0ho/UN59VTO3Jfpv5/+Dyb1wQQsdfNEnWD4JgI3I6JWvRjVqopFMiUudcXvGWqgsYngqelfg8pHOZ1E4HZx1efUNWZDw1c=
# Before installing dependencies
before_install:
- cd src
- sudo apt-get update
- sudo apt-get install -y python-pip python-dev build-essential cmake libopenblas-dev liblapack-dev --no-install-recommends
# Install dependencies
install:
- pip install -r requirements.txt
# Command to run tests
script:
- make test
- if [[ ! -z ${TRAVIS_TAG} ]]; then IMAGE=jtorregrosa/face2face-face-align-api TAG=${TRAVIS_TAG} make image; fi;
- cd ..
- sonar-scanner
# Commands executed before deploy
before_deploy:
- docker login -u ${DOCKER_USERNAME} -p ${DOCKER_PASSWORD}
# Deploy the docker image
deploy:
provider: script
skip_cleanup: true
script: cd ./src && IMAGE=jtorregrosa/face2face-face-align-api TAG=${TRAVIS_TAG} make push-image && IMAGE=jtorregrosa/face2face-face-align-api TAG=latest make push-image
on:
tags: true