pixelpassion / django-saas-boilerplate

A Django + django-rest-framework + Heroku + SaaS application boilerplate
MIT License
51 stars 10 forks source link

Codecov #28

Open jensneuhaus opened 4 years ago

jensneuhaus commented 4 years ago

☝️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

jensneuhaus commented 4 years ago

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: