Skip to content

Conversation

@gribok
Copy link
Contributor

@gribok gribok commented Mar 29, 2020

Based on #207, I added measuring for test coverage.

See example https://coveralls.io/github/gribok/coronavirus-tracker-api

Features:

  • Add section coverage-test to Makefile
    Basically everyone can run locally test cases with coverage measuring via make coverage-test.
    I will create .coverage-sqlite-file, which can be reviewed witch coverage report.
    $ make coverage-test
    [output ottmited]
    $ ls -a .coverage
    .coverage
    $ file .coverage
    .coverage: SQLite 3.x database
    $ coverage report
    Name                                Stmts   Miss  Cover
    -------------------------------------------------------
    [output ottmited]
    -------------------------------------------------------
    TOTAL                                 328     21    94%
  • Add coversalls to Travis-CI pipeline to visualize statement coverage in code.
  • Add coveralls badge to README
  • At every PR, coveralls will show the measuring

ToDos

  • Activate coveralls (https://coveralls.io/) from one maintainer
  • Thresholding is deactivated by default. It is possible to define threshold via settings of coveralls, if you switch into your branch.
    It makes sense to setup a threshold, that every new code should be merge with covered test cases

Please merge #205 first, to get a clear merge history.

Enjoy!

@gribok
Copy link
Contributor Author

gribok commented Mar 29, 2020

The after_success step in Travis-CI failed, because the access coveralls is not unlocked.

Copy link
Collaborator

@Kilo59 Kilo59 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you've used the same branch for both of these PRs
#205

@Kilo59
Copy link
Collaborator

Kilo59 commented Mar 30, 2020

@gribok
I basically did the same thing on my fork as well.
Except I used the pytest-cov plugin instead of coverage directly.
https://coveralls.io/github/Kilo59/coronavirus-tracker-api
master...Kilo59:master

@gribok
Copy link
Contributor Author

gribok commented Mar 30, 2020

I am going to close the PR, seperate the changes for #169 and #207 in two branches and create new PRs based on mentioned issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants