language: python
cache: pip
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
  - pip install -r requirements.txt
  - pip install pytest coverage pytest-cov
  - DEBUG=1 python setup.py install
jobs:
  include:
    - stage: test
      python: "3.8"
      script:
        - pytest --cov=./ --cov-report=xml
      after_script:
        - coverage xml
        - coverage report
        - ./cc-test-reporter after-build -t coverage.py --exit-code ${TRAVIS_TEST_RESULT}



