jmarca/initial-solution

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
dist: xenial   # required for Python >= 3.7
language: python
python:
  - "3.8"
env:
  global:
    - CC_TEST_REPORTER_ID=74a0fe10dc3d3d64c1fdb9ecd84036df2c78e00d649645ee90f8c360cfddad5c

# command to install dependencies
before_install:
  - sudo apt-get install libcurl4-gnutls-dev libgnutls-dev

install:
  - pip install -r requirements.txt
  - pip install coverage

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

# command to run tests
script: pytest --cov=src --cov-report=xml

after_script:
  - pytest --cov=src --cov-report=xml  && ./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT