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 diff-cover to CI #119

Merged
merged 1 commit into from
Aug 27, 2024
Merged

add diff-cover to CI #119

merged 1 commit into from
Aug 27, 2024

Conversation

MathieuLamiot
Copy link

Description

Add diff-cover to the CI:

  • Pytest runs with the coverage option
  • The result is saved as a GH artifact
  • A subsequent step is added to the CI to check diff-coverage and reports in the comments.

Type of change

  • New feature (non-breaking change which adds functionality).
  • Bug fix (non-breaking change which fixes an issue).
  • Enhancement (non-breaking change which improves an existing functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as before).
  • Sub-task of #(issue number)
  • Release

Detailed scenario

The new CI is triggered whenever a new PR is opened. It checks lint & tests (as before, but in 2 separated steps). If tests are successful, diff coverage is computed and reported.

Technical description

Documentation

NA

New dependencies

diff-cover
pytest-cov

Risks

NA

Mandatory Checklist

Code validation

  • I validated all the Acceptance Criteria. If possible, provide screenshots or videos.
  • I triggered all changed lines of code at least once without new errors/warnings/notices.
  • I implemented built-in tests to cover the new/changed code.

Code style

  • I wrote a self-explanatory code about what it does.
  • I protected entry points against unexpected inputs.
  • I did not introduce unnecessary complexity.
  • Output messages (errors, notices, logs) are explicit enough for users to understand the issue and are actionnable.

Additional Checks

  • In the case of complex code, I wrote comments to explain it.
  • When possible, I prepared ways to observe the implemented system (logs, data, etc.).
  • I added error handling logic when using functions that could throw errors (HTTP/API request, filesystem, etc.)

@MathieuLamiot MathieuLamiot self-assigned this Aug 27, 2024
Copy link

Diff Coverage

Diff: origin/develop...HEAD, staged and unstaged changes

No lines with coverage information in this diff.

@MathieuLamiot MathieuLamiot merged commit c8f8925 into develop Aug 27, 2024
4 checks passed
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.

1 participant