Repository navigation
ci: add aggregate checks for tests and scans - #421
Conversation
Required checks can name "Unit tests" and "Scan images" instead of every matrix job, so they don't change with the supported versions. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideThe workflow now exposes stable Flow diagram for aggregate CI checksflowchart LR
TestMatrix["Unit tests matrix"] --> TestAggregate["Unit tests"]
ScanMatrix["Image scan matrix"] --> ScanAggregate["Scan images"]
TestAggregate --> Rulesets["Branch protection rulesets"]
ScanAggregate --> Rulesets
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #421 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 27 27
Lines 2777 2777
=========================================
Hits 2777 2777
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path=".github/workflows/checks.yml" line_range="297" />
<code_context>
+ test-passed:
+ name: Unit tests
+ if: always()
+ needs: [test]
+ runs-on: ubuntu-latest
+ timeout-minutes: 5
</code_context>
<issue_to_address>
**Minimum-version failures go unnoticed**
When the lowest-dependency unit-test job fails while the `test` matrix succeeds and a ruleset relies on `Unit tests` without separately requiring `test-lowest`, `test-passed` checks only `needs.test.result`, so it remains successful and the ruleset accepts changes that break the declared minimum dependency versions.
Make `test-passed` depend on and verify `test-lowest` as well as `test`.
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: .github/workflows/checks.yml:297
| test-passed: | ||
| name: Unit tests | ||
| if: always() | ||
| needs: [test] |
There was a problem hiding this comment.
🟠 High · Minimum-version failures go unnoticed
When the lowest-dependency unit-test job fails while the test matrix succeeds and a ruleset relies on Unit tests without separately requiring test-lowest, test-passed checks only needs.test.result, so it remains successful and the ruleset accepts changes that break the declared minimum dependency versions.
Make test-passed depend on and verify test-lowest as well as test.
Prompt for AI agents
In `.github/workflows/checks.yml` at line 297:
**Minimum-version failures go unnoticed**
When the lowest-dependency unit-test job fails while the `test` matrix succeeds and a ruleset relies on `Unit tests` without separately requiring `test-lowest`, `test-passed` checks only `needs.test.result`, so it remains successful and the ruleset accepts changes that break the declared minimum dependency versions.
Make `test-passed` depend on and verify `test-lowest` as well as `test`.
Summary
Adds two aggregate jobs to
checks.yml, following Cloud Registry'sRun tests:Unit testspasses only if allUnit tests (Python …, MongoDB …)jobs passed.Scan imagespasses only if allScan image (Python …)jobs passed.Both use
if: always(), so a failed or cancelled matrix job fails the aggregate instead of skipping it. They have no permissions. Rulesets can require these two stable names instead of every matrix entry.Closes #420
Verification
Light lane: no reviewer subagents.
Open questions
None. After the merge, the maintainer adds
Unit testsandScan imagesas required checks fordev.🤖 Generated with Claude Code
Summary by Sourcery
Add stable aggregate CI checks for unit tests and image scans to simplify branch protection rules.
New Features:
CI: