-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
40 lines (31 loc) · 1.18 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
language: python
sudo: required
services:
- docker
env:
global:
- REPO=michaelvl/osmtracker
- REPO_COMB=michaelvl/osmtracker-all-in-one
- GITCOMMIT=${TRAVIS_COMMIT::7}
python:
- '2.7'
install:
- pip install -r requirements.txt
- pip install -r test-requirements.txt
script:
- gzip -c osm/test/data/urls/planet.osm.org/replication/changesets/000/001/234.osm > osm/test/data/urls/planet.osm.org/replication/changesets/000/001/234.osm.gz
- (cd osm && python -m unittest discover)
- python -m unittest discover -s test/
#- python -m unittest discover -s apiserver/test/
after_success:
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
- docker build -t $REPO:git-$GITCOMMIT --file docker/Dockerfile .
- docker tag $REPO:git-$GITCOMMIT $REPO:$TAG
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
- docker push $REPO:git-$GITCOMMIT
- docker push $REPO:$TAG
- docker build -t $REPO_COMB:git-$GITCOMMIT --file docker/Dockerfile-all-in-one .
- docker tag $REPO_COMB:git-$GITCOMMIT $REPO_COMB:$TAG
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
- docker push $REPO_COMB:git-$GITCOMMIT
- docker push $REPO_COMB:$TAG