Codecov
jensneuhaus opened this issue · comments
Jens Neuhaus commented
☝️What is it? Why do we need it?
It would be nice to have support for Codecov to see the Coverage report. Support for it should be activated, if CODECOV_TOKEN
is set.
💭 Implementation details
📋 Todos
- tbd
Jens Neuhaus commented
This is how we have done it so far:
CircleCi config
- run:
name: Run tests and create a Report
command: |
mkdir test-reports
pipenv run create-coverage
pipenv run codecov-report
pipenv run codecov
Pipenv
codecov = "*"
responses = "*"
pytest-env = "*"
[requires]
python_version = "3.7"
[pipenv]
allow_prereleases = true
[scripts]
go-docker = "docker-compose up -d"
create-coverage = "coverage run -m py.test"
check-coverage = "coverage report --fail-under=95"
codecov-report = "coverage xml"
Maybe we can create a manage.py coverage-reports codecov
script, which would:
- Has a switch for Codecov (so it could be changed easily to another solution)
- Checks if
CODECOV_TOKEN
is set - if not, stop with a message - Run the commands
coverage run -m py.test
+coverage report --fail-under=95
+coverage xml