language: python python: - "3.6" env: global: - DOCKER_IMAGE=stablebaselines/stable-baselines3-cpu:0.6.0a5 notifications: email: false services: - docker install: - docker pull ${DOCKER_IMAGE} script: - ./scripts/run_tests_travis.sh "${TEST_GLOB}" jobs: include: # Big test suite. Run in parallel to decrease wall-clock time, and to avoid OOM error from leaks - stage: Test name: "Unit Tests a-h" env: TEST_GLOB="[a-h]*" - name: "Unit Tests i-l" env: TEST_GLOB="[i-l]*" - name: "Unit Tests m-sa" env: TEST_GLOB="{[m-r]*,sa*}" - name: "Unit Tests sb-z" env: TEST_GLOB="{s[b-z]*,[t-z]*}" - name: "Sphinx Documentation" script: - 'docker run -it --rm --mount src=$(pwd),target=/root/code/stable-baselines3,type=bind ${DOCKER_IMAGE} bash -c "cd /root/code/stable-baselines3/ && pushd docs/ && make clean && make html"' - name: "Type Checking" script: - 'docker run --rm --mount src=$(pwd),target=/root/code/stable-baselines3,type=bind ${DOCKER_IMAGE} bash -c "cd /root/code/stable-baselines3/ && pytype --version && pytype"' - stage: Codacy Trigger if: type != pull_request script: # When all test coverage reports have been uploaded, instruct Codacy to start analysis. - 'docker run -it --rm --network host --ipc=host --mount src=$(pwd),target=/root/code/stable-baselines3,type=bind --env CODACY_PROJECT_TOKEN=${CODACY_PROJECT_TOKEN} ${DOCKER_IMAGE} bash -c "cd /root/code/stable-baselines3/ && java -jar /root/code/codacy-coverage-reporter.jar final"'