Skip to content

Migrate code coverage tool from c8 to codecov #534

Closed
@thehenrytsai

Description

@thehenrytsai

Background:

We currently use c8 as the code coverage tool, while it is useful to see the coverage as we run tests locally on the command-line terminal, it would be great to also add a tool that does CICD integration.

Task Details:

Integrate codecov with our CICD.

A couple of min-bar requirements that comes to mind:

  • The README.md shows the latest updated code coverage numbers.
  • Showing code coverage delta/difference for each submitted PR.
  • Have a customized codecov.yml tailored to our needs:
    1. Require 100% coverage on new code
    2. Require coverage to never drop
    3. Exclude interface/type files if needed

Example (incomplete) snippet of codecov.yml:

component_management:
  default_rules:
    statuses:
      - type: project
        target: auto # auto compares coverage to the previous base commit
        threshold: 0% # do not allow coverage drop from the previous base commit coverage
      - type: patch
        target: 100 # all new code should be tested 

There is a precedence that we can follow in web5-js repo, you can probably locate the PR/commit in its commit history and copy the pattern/code from there.

Picking Up This Issue:

  • If you'd like to work on this, please comment "picking this up" below, and I'll assign the issue to you

Questions:

Resources:

  • Creating a Pull Request: If you're new to GitHub and unsure how to create a pull request, follow this step-by-step guide.

Remember, communication is key! If you have any questions or face any challenges, we're here to help so please don't hesitate to reach out.

Good Luck! 🍁

Metadata

Metadata

Assignees

Labels

CICDCICD related itembuildBuild related issuesgood first issueGood for newcomershacktoberfestFor the hacking month of Octoberhelp wantedExtra attention is neededtestingrelated to new or existing tests

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions