forked from hill-a/stable-baselines
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
17 lines (13 loc) · 996 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
language: python
python:
- "3.5"
notifications:
email: false
services:
- docker
install:
- docker pull araffin/stable-baselines-cpu
script:
# For pull requests from fork, Codacy token is not available, leading to build failure
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then docker run -it --rm --network host --ipc=host --mount src=$(pwd),target=/root/code/stable-baselines,type=bind araffin/stable-baselines-cpu bash -c "cd /root/code/stable-baselines/ && pytest --cov-config .coveragerc --cov-report term --cov=. -v tests/"; fi'
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then docker run -it --env CODACY_PROJECT_TOKEN=$CODACY_PROJECT_TOKEN --rm --network host --ipc=host --mount src=$(pwd),target=/root/code/stable-baselines,type=bind araffin/stable-baselines-cpu bash -c "cd /root/code/stable-baselines/ && pytest --cov-config .coveragerc --cov-report term --cov-report xml --cov=. -v tests/ && python-codacy-coverage -r coverage.xml --token=$CODACY_PROJECT_TOKEN"; fi'