Warning

Work in progress…

Travis & Codecov configuration

As briefly discussed in the Code Coverage based on Unit Tests section, Travis is configured to run the complete regression (all tests found in the test/ folder) and computed the coverage using the same tools as the local coverage computation.

The difference comes after the build on Travis is successful, and the codecov module kicks in, uploading the coverage statistics to codecov.io. This is achieved by a set of configuration files found at the root of the project.

Linking Travis and Codecov

Computing code coverage locally is a nice tool, but most importantly, the ability to follow the evolution of your coverage throughout the development cycles of your application is a very effective metric to know how your process is evolving, and whether or not your investment on testing in increasing or decreasing.

This is achieved through a configuration file .codecov.yml located at the root of the project directory:

.codecov.yml
coverage:
  status:
    patch: no
    changes: no
    project:
      default: false
      app:
        paths: "app/"
        target: 75%
      tests:
        paths: "test/"
        target: 95%
      tools:
        paths: "tools/"
        target: 85%

And a few special directives to the .travis.yml:

.travis.yml
language: python

python:
  - "3.7"

addons:
  apt:
    packages:
      - libenchant-dev
      - graphviz

install:
  - "pip install -r requirements.txt"
  - "pip install codecov"

script:
  - "make check PYTHON=\"python\""
  - "make coverage PYTHON=\"python\""
  - "make doc PYTHON=\"python\""

after_success:
  - "codecov"