-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
50 lines (43 loc) · 1.38 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
branches:
# all branches
only:
- gh-pages
- /.*/
language: python
python:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
services:
- docker
before_install:
- sudo apt-get install libgnutls28-dev
install:
# Build/test dependencies
- pip install --upgrade pip
- pip install --no-cache-dir -r requirements/10_preprocess.txt
- pip install coveralls
script:
# Run django tests. (Note django settings are an env variable)
- cd preprocess; python -m unittest; cd ..
#- cd preprocess_web/code; python manage.py test; cd ../../
#- coverage run --source=ravens_metadata_apps.ta2_interfaces manage.py test ravens_metadata_apps.ta2_interfaces ravens_metadata_apps.workspaces
#- docker build -t tworavens/ravens-main:latest .
- echo $TRAVIS_BRANCH;
after_success:
# Build an image and push to dockerhub
- echo $TRAVIS_BRANCH;
- if [ "$TRAVIS_BRANCH" = "master" ]; then
docker build -t tworavens/raven-metadata-service:latest -f ./Dockerfile-web .;
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
docker push tworavens/raven-metadata-service:latest;
fi
- if [ "$TRAVIS_BRANCH" = "xdevelop" ]; then
docker build -t tworavens/raven-metadata-service:develop -f ./Dockerfile-web .;
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
docker push tworavens/raven-metadata-service:develop;
fi
# send report to coveralls
#after_success:
# coveralls