ci(cd): normalize and align CD pipeline (#564)#565
Conversation
- Extract test job from release so tests run before any publish step - Add enable-cache: true to astral-sh/setup-uv for faster installs - Add id-token: write and attestations: write to release permissions - Set provenance: mode=max - Add id: push and actions/attest-build-provenance@v4.1.0 - Add --no-merges to changelog git log command - Normalize first-release message to "No changes (first release)" - Remove changelog.txt write step Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughExtracts a dedicated Changes
Sequence DiagramsequenceDiagram
participant Trigger as Git Tag Push
participant TestJob as Test Job
participant ReleaseJob as Release Job
participant Builder as Docker Build
participant Registry as Container Registry
participant Attest as Attest Service
Trigger->>TestJob: run on v*.*.*-* tag
TestJob->>TestJob: checkout, setup Python, setup uv (cache), install deps, pytest -v
alt tests pass
TestJob-->>ReleaseJob: success (needs: test)
ReleaseJob->>ReleaseJob: generate changelog (--no-merges)
ReleaseJob->>Builder: build image (provenance: mode=max) for amd64 & arm64
Builder->>Registry: push image (capture digest)
ReleaseJob->>Attest: attest build provenance (use digest)
Attest->>Registry: push attestation
ReleaseJob->>ReleaseJob: create GitHub Release
else tests fail
TestJob-->>ReleaseJob: fail (block release)
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Assessment Against Linked Issues
Possibly related issues
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #565 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 7 7
Lines 172 172
=========================================
Hits 172 172 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/python-cd.yml:
- Around line 40-42: The "Run tests with pytest" step generates coverage.xml but
doesn't publish it; add a new step immediately after the "Run tests with pytest"
step in the same job (the test job) to upload the coverage report (e.g., using
actions/upload-artifact or codecov action) so coverage.xml is
uploaded/published; ensure the new step references the generated coverage file
name (coverage.xml) and uses a clear name like "Upload coverage report" to
satisfy the guideline requiring a coverage report upload step.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 5da77284-479a-4726-aeba-a0b09ee1fdab
📒 Files selected for processing (2)
.github/workflows/python-cd.ymlCHANGELOG.md
CD only needs a pass/fail signal; coverage reporting belongs in CI. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|



Summary
testjob fromreleaseso tests run in isolation before any publish stepenable-cache: truetoastral-sh/setup-uvfor faster dependency installsid-token: writeandattestations: writepermissions toreleaseprovenance: mode=max; attest image digest withactions/attest-build-provenance@v4.1.0--no-mergesto the changeloggit logcommand"No changes (first release)"changelog.txtwrite stepTest plan
testjob runs and fails fast if tests fail (before Docker build starts)releasejob only runs whentestsucceedsCloses #564
🤖 Generated with Claude Code
This change is
Summary by CodeRabbit