perf(ci): split the CI build into lint, test and scan jobs - #58
Merged
Conversation
📝 WalkthroughWalkthroughThe CI workflow now separates linting, matrix testing, and scanning. Python 3.12 coverage is passed to a dependent scan job, which skips draft pull requests. The changelog documents the updated pipeline. ChangesCI pipeline restructuring
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant PullRequest
participant TestMatrix
participant CoverageArtifact
participant ScanJob
participant SonarQube
participant DefectDojo
PullRequest->>TestMatrix: trigger CI on ready_for_review
TestMatrix->>CoverageArtifact: upload Python 3.12 coverage.xml
TestMatrix->>ScanJob: complete test job
ScanJob->>CoverageArtifact: download coverage.xml
ScanJob->>SonarQube: run analysis
ScanJob->>DefectDojo: push scan results
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Mirror the layout adopted in Utiligize/assetlife-api: lint runs on its own single-version job in parallel with the 3.12/3.13/3.14 test matrix, so a lint failure surfaces without waiting for the matrix. The scan job needs test, downloads the coverage report uploaded by the 3.12 test job instead of recomputing it, and caches ~/.sonar/cache. Scan is skipped on draft PRs; ready_for_review is added to the trigger types so marking a draft ready re-runs it. The test step gets COVERAGE_CORE=sysmon to cut branch-coverage overhead. Co-Authored-By: Claude <noreply@anthropic.com>
sys.monitoring cannot measure branch coverage before Python 3.14, so coverage emits a CoverageWarning, which filterwarnings = ["error"] turns into a hard failure on the 3.12 and 3.13 matrix legs. assetlife-api runs a single 3.14 job and does not hit this. Co-Authored-By: Claude <noreply@anthropic.com>
kthy
force-pushed
the
feature/ci-split-jobs
branch
from
July 24, 2026 08:10
e378858 to
8defc48
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description of PR
Emulates the CI layout adopted elsewhere. The single serial
buildjob becomes three:just lint-ci. No longer waits behind (or repeats across) the test matrix, so a lint failure surfaces fast.just test. The 3.12 job uploadscoverage.xmlas an artifact (1 day retention).needs: test, downloads that coverage artifact instead of recomputing it, caches~/.sonar/cache, then runs Sonar and the DefectDojo push.fetch-depth: 0now applies only here, where Sonar needs it.The scan job is skipped on draft PRs, and
ready_for_reviewis added to thepull_requesttrigger types so marking a draft ready re-runs the workflow (including Sonar).Link to the Jira ticket
No ticket — tooling chore, aligning this repo's CI with
Utiligize/assetlife-api.How to verify that it worked
Verified with a
workflow_dispatchrun on this branch: https://github.com/Utiligize/configator-op/actions/runs/30077530190 — Lint 10s, the three test jobs in parallel (16–20s each), Scan 52s afterwards consuming the uploadedcoverageartifact.Note that pushes to branches containing a
/do not match the existingbranches: ['*']push filter, so branch CI here runs via thepull_requesttrigger (or dispatch). That pre-existing quirk is untouched by this PR.Locally validated with
actionlintandzizmor --persona=auditor(no findings).Are the changes in this PR covered by tests run by the CI workflow? - If no, then describe how it was tested below the checkboxes.
🤖 Generated with Claude Code
Summary by CodeRabbit