-
Notifications
You must be signed in to change notification settings - Fork 563
ci: add lint workflow and unify coverage reporting #1517
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
Conversation
- Added a new lint workflow to run pre-commit hooks on PRs and pushes. - Updated test workflows to support coverage reporting via a matrix flag. - Unified coverage upload to Codecov in the main test workflow. - Removed the redundant test-coverage-report workflow. - Improved path-ignore patterns for docs workflows.
Greptile OverviewGreptile SummaryThis PR consolidates CI workflows by introducing a dedicated lint workflow, unifying coverage reporting in the reusable test workflow, and removing the redundant test-coverage-report workflow. Major changes:
Issues found:
|
| Filename | Score | Overview |
|---|---|---|
| .github/workflows/_test.yml | 2/5 | Added with-coverage parameter and split pytest into two conditional steps with codecov upload; directory parameter in codecov upload points to wrong location |
| .github/workflows/lint.yml | 4/5 | New workflow that runs pre-commit hooks on PRs and pushes; well-structured with proper caching |
| .github/workflows/pr-tests.yml | 3/5 | Updated to skip markdown and workflow changes, added coverage for Python 3.11, and properly inherits secrets; paths-ignore won't match .yaml files |
Sequence Diagram
sequenceDiagram
participant PR as Pull Request
participant Lint as Lint Workflow
participant PRTests as PR Tests Workflow
participant Skip as PR Tests Skip Workflow
participant Test as _test.yml (Reusable)
participant Codecov as Codecov
Note over PR: Developer opens/updates PR
alt PR changes docs or workflows only
PR->>Skip: Trigger (paths match)
Skip->>Skip: Echo "Tests skipped"
else PR changes code
PR->>Lint: Trigger (all PRs)
Lint->>Lint: Run pre-commit hooks
PR->>PRTests: Trigger (paths-ignore)
Note over PRTests: Matrix: Python 3.10-3.13
loop For each Python version
PRTests->>Test: Call with parameters
Note over Test: with-coverage=true for Python 3.11
alt with-coverage enabled
Test->>Test: pytest --cov (output: coverage.xml)
Test->>Codecov: Upload coverage.xml
Note over Test,Codecov: Uses directory: ./coverage/reports/<br/>but file is at root (MISMATCH)
else without coverage
Test->>Test: pytest (no coverage)
end
end
Test-->>PRTests: All matrix jobs complete
PRTests->>PRTests: Summary step confirms success
end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 files reviewed, 3 comments
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
0c3efbd to
2e3dcb4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4 files reviewed, 1 comment
2e3dcb4 to
7cc9c7b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4 files reviewed, 1 comment
7cc9c7b to
a30bcf0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4 files reviewed, no comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR consolidates CI workflows by introducing a dedicated linting workflow and unifying coverage reporting into the main test workflow, removing redundancy.
Key Changes:
- Introduced a new
lint.ymlworkflow to run pre-commit hooks separately from tests - Added coverage reporting support to the reusable
_test.ymlworkflow via a matrix flag - Removed the redundant
test-coverage-report.ymlworkflow
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/test-coverage-report.yml |
Deleted standalone coverage workflow, now integrated into main test workflow |
.github/workflows/pr-tests.yml |
Added coverage flag to matrix and updated path-ignore patterns |
.github/workflows/pr-tests-skip.yml |
New workflow to skip tests when only documentation changes |
.github/workflows/lint.yml |
New dedicated linting workflow with caching support |
.github/workflows/_test.yml |
Added coverage parameter and moved coverage upload from deleted workflow |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 files reviewed, no comments
Description