mchoji/wtg-seal

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
# Travis configuration file using the build matrix feature
# Read more under http://docs.travis-ci.com/user/build-configuration/

sudo: false
env:
  global:
    - CC_TEST_REPORTER_ID=f25c7fe3932cb67e4742a70e07646dadbee01e2a82007285431baf283205e0f9
language: python
virtualenv:
  system_site_packages: false
matrix:
  fast_finish: true
  include:
    - python: 3.8
      env: DISTRIB="ubuntu" COVERAGE="true"
install:
  - source tests/travis_install.sh
before_script:
  - git config --global user.email "mchoji@users.noreply.github.com"
  - git config --global user.name "M. Choji"
  - 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 setup.py develop
  - |
    if [[ "$COVERAGE" == "true" ]]; then
      pre-commit install
      pre-commit run --all-files
    fi
after_success:
after_script:
  - if [[ "$COVERAGE" == "true" ]]; then pytest --cov-report=xml && ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT || echo "failed"; fi
  - if [[ "$COVERAGE" == "true" ]]; then coveralls || echo "failed"; fi
  - travis-cleanup
cache:
  pip: true