-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
42 lines (40 loc) · 1.43 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
language: python
matrix:
include:
- os: linux
dist: trusty
sudo: required
python: '3.6'
install:
- sudo apt-get update
- sudo apt-get install -o Dpkg::Options::="--force-confold" --force-yes -y docker-ce
- docker-compose --version
- sudo rm /usr/local/bin/docker-compose
- sudo pip install docker-compose
# build miniworld container
- export REPO=miniworldproject/miniworld_core
- pushd ~/build/miniworld-project/miniworld_core
- BRANCH=$TRAVIS_BRANCH ci/build_container.sh
# clone miniworld_playground
- git clone https://github.com/miniworld-project/miniworld_playground.git
- pushd miniworld_playground
script:
- uname -a
# run tests
- BRANCH=$TRAVIS_BRANCH docker-compose run --entrypoint flake8 core # flake8
- MW_CONFIG=tests/config.json BRANCH=$TRAVIS_BRANCH docker-compose up -d # start docker environment
- sleep 10
- MW_CONFIG=tests/config.json BRANCH=$TRAVIS_BRANCH docker-compose logs
- docker-compose exec core pytest -x -v -m "not examples" tests # actual tests
after_script:
- docker-compose logs > docker-compose.txt
after_success:
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
# push docker image
- docker push $REPO:$TRAVIS_BRANCH
addons:
artifacts:
s3_region: "eu-west-1"
paths:
- docker-compose.txt