.travis.yml
language: python
python:
- "3.6"
sudo: required
services:
- docker
install:
- pip install -r dev-requirements.txt
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- python -m pytest --cov=theia --cov-report xml:coverage-report.xml -s tests/
after_script:
- if [ -f "coverage-report.xml" ]; then sed 's|<source>.*/theia</source>|<source>theia</source>|' coverage-report.xml > coverage.xml; fi && ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
after_success:
- if [ "${TRAVIS_PULL_REQUEST}" == "false" ] && [ "${TRAVIS_BRANCH}" == "master" ]; then docker build -t theialog/theia:latest -f docker/Dockerfile . && echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin && docker push theialog/theia:latest ; fi