Skip to content

ci: add aggregate checks for tests and scans - #421

Merged
uniqueg merged 1 commit into
devfrom
ci/aggregate-checks
Oct 23, 2026
Merged

uniqueg merged 1 commit into
devfrom
ci/aggregate-checks

Conversation

@uniqueg

@uniqueg uniqueg commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds two aggregate jobs to checks.yml, following Cloud Registry's Run tests:

  • Unit tests passes only if all Unit tests (Python …, MongoDB …) jobs passed.
  • Scan images passes only if all Scan 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

  • CI on this PR: both new checks appear and pass.

Light lane: no reviewer subagents.

Open questions

None. After the merge, the maintainer adds Unit tests and Scan images as required checks for dev.

🤖 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:

  • Add stable aggregate checks for unit tests and image scans that can be required independently of matrix job names.

CI:

  • Add always-running aggregate CI jobs that fail when any required test or image-scan matrix job fails or is cancelled.

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]>
@sourcery-ai

sourcery-ai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

The workflow now exposes stable Unit tests and Scan images checks that aggregate their respective matrices and fail reliably when any underlying jobs do not succeed, allowing rulesets to require fixed check names.

Flow diagram for aggregate CI checks

flowchart LR
    TestMatrix["Unit tests matrix"] --> TestAggregate["Unit tests"]
    ScanMatrix["Image scan matrix"] --> ScanAggregate["Scan images"]
    TestAggregate --> Rulesets["Branch protection rulesets"]
    ScanAggregate --> Rulesets
Loading

File-Level Changes

Change Details Files
Add stable aggregate status checks for the unit-test and image-scan matrices.
  • Add always-running jobs that depend on the corresponding matrix job.
  • Fail each aggregate job unless its matrix result is exactly successful, including failed or cancelled runs.
  • Use stable display names, minimal permissions, and short execution timeouts for branch-protection requirements.
.github/workflows/checks.yml

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codecov

codecov Bot commented Oct 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (86a2471) to head (d6e33fd).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #421   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           27        27           
  Lines         2777      2777           
=========================================
  Hits          2777      2777           
Flag Coverage Δ
test_unit 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@uniqueg
uniqueg marked this pull request as ready for review October 23, 2026 00:51
@uniqueg
uniqueg merged commit f74be0a into dev Oct 23, 2026
21 checks passed
@uniqueg
uniqueg deleted the ci/aggregate-checks branch October 23, 2026 00:51

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

test-passed:
name: Unit tests
if: always()
needs: [test]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 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`.

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