Skip to content

Split the build pipeline into gated stages - #7

Merged
stphnwlsh merged 3 commits into
mainfrom
feature/staged-build-pipeline
Oct 27, 2026
Merged

stphnwlsh merged 3 commits into
mainfrom
feature/staged-build-pipeline

Conversation

@stphnwlsh

@stphnwlsh stphnwlsh commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Summary

Same pipeline as LeanMeanCleanApps/CleanWebApi#13. build-pipeline.yml is split into stages so nothing publishes unless every check passes.

  • Build and Test runs the tests, builds the runtime image and packs the NuGet template once, and hands all three on as artifacts.
  • Code Coverage, Container Scan and Static Analysis (actions, csharp) run in parallel once Build and Test passes.
  • Publish runs on main only, after all of them pass. It pushes the exact image and package that were tested.

Other changes:

  • CodeQL moves into this workflow and keeps its weekly schedule. codeql.yml is removed.
  • Code Coverage enforces the 95% line coverage itself. Codecov still gets the report, but its project and patch statuses are informational.
  • Container Scan fails on fixable high or critical Trivy findings.
  • PR runs cancel when a newer push lands.
  • NuGet publishing uses trusted publishing, so this replaces the open trusted publishing PR for this repo.

Related issues

None

Build and Test runs first and produces the coverage report, Docker image
and NuGet template as artifacts. Code Coverage, Container Scan and Static
Analysis then run once it passes and must all pass before Publish pushes
the same image and package on main. CodeQL moves into the pipeline, the
95% coverage gate is enforced by the Code Coverage job and Codecov
statuses become informational.
@stphnwlsh stphnwlsh self-assigned this Oct 27, 2026
@codecov

codecov Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.71%. Comparing base (091b481) to head (68af3a7).

Additional details and impacted files
@@           Coverage Diff           @@
##             main       #7   +/-   ##
=======================================
  Coverage   99.71%   99.71%           
=======================================
  Files          39       39           
  Lines         356      356           
  Branches        8        8           
=======================================
  Hits          355      355           
  Partials        1        1           

☔ 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.

The report summary counts sequence points in generated code that Codecov
ignores, so the gate read below Codecov's figure. Count distinct lines in
files that exist in the repo instead, and list the least covered files in
the job log.
@stphnwlsh
stphnwlsh merged commit dd04643 into main Oct 27, 2026
12 checks passed
@stphnwlsh
stphnwlsh deleted the feature/staged-build-pipeline branch October 27, 2026 14:48
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