Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Code Coverage Integration #415

Open
3 of 7 tasks
JP-Ellis opened this issue Oct 10, 2023 · 0 comments
Open
3 of 7 tasks

Add Code Coverage Integration #415

JP-Ellis opened this issue Oct 10, 2023 · 0 comments
Assignees
Labels
area:ci Relating to the CI/CD workflow difficulty:easy A simple task appropriate for newcomers to the codebase good first issue Good for newcomers type:chore Part of regular code upkeep

Comments

@JP-Ellis
Copy link
Contributor

JP-Ellis commented Oct 10, 2023

Have you read the Contributing Guidelines on issues?

Description

  • Make sure that the test.yml workflow includes code coverage.
  • Report on the code coverage to an external service. Some services include:
    • Codecov

      A placeholder for this has already been added to the test.yml workflow:

      - name: Upload coverage
      # TODO: Configure code coverage monitoring
      if: false && matrix.python-version == env.STABLE_PYTHON_VERSION && matrix.os == 'ubuntu-latest'
      uses: codecov/codecov-action@v2
      with:
      token: ${{ secrets.CODECOV_TOKEN }}

    • Coveralls

    • Codacy (maybe?)

To begin with, the code coverage reporting would only be used as extra information, but the idea going forward would be to use the reports to ensure that code added or modified in PRs is covered appropriately.

Has this been requested on Canny?

No response

Motivation

Code coverage shows which lines are and are not covered as part of a test suite. PyTest has support for this through pytest-cov, and most other languages have an equivalent.

While trying to target 100% coverage should not be a target in its own right, having clear and visible code coverage reporting can be a really useful tool during review to help ensure that changed code is behaving as expected.

Have you tried building it?

No response

Self-service

  • I'd be willing to contribute this feature to Pact Python myself.
@JP-Ellis JP-Ellis self-assigned this Oct 13, 2023
@JP-Ellis JP-Ellis added good first issue Good for newcomers difficulty:easy A simple task appropriate for newcomers to the codebase area:ci Relating to the CI/CD workflow type:chore Part of regular code upkeep labels Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:ci Relating to the CI/CD workflow difficulty:easy A simple task appropriate for newcomers to the codebase good first issue Good for newcomers type:chore Part of regular code upkeep
Projects
Status: 🚀 To-Do
Development

No branches or pull requests

1 participant