hotosm / website

Other
2 stars 0 forks source link

Setup Code Coverage and Improve Test Coverage #9

Closed katporks closed 10 months ago

katporks commented 10 months ago

This pull request includes several changes aimed at setting up code coverage and improving the test coverage of the codebase:

  1. Added coverage.py to the project and increased the test coverage.
  2. Removed unnecessary global test lines from the codebase.
  3. Added a coverage test command to the Makefile.
  4. Integrated coverage reporting into pytest GitHub Actions workflow (switched command from pytest to one using coverage.py). Coverage information will be displayed within the log on each pull request.

These changes will help us monitor and improve the quality of our tests, ensuring that our codebase remains robust and reliable as it grows.

spwoodcock commented 10 months ago

I took some inspiration from you and decided to add coverage to FMTM.

I will add a reusable GH-workflow to run coverage and generate a HTML output.

I will also look at adding the total coverage as a badge to the README.

Will ping you after it's done 👍

katporks commented 10 months ago

Neat 😄

BTW, the description says you added a Github Workflow for coverage, but I can't see one.

Oops, my bad! I'll change the description. I just changed the command I passed to the pytest workflow 👍🏼