Skip to content

chore: v0.4.x stabilization — CI matrix, coverage, real E2E test - #40

Merged
AamiriYouness merged 5 commits into
mainfrom
chore/v0.4.x-stabilization
Aug 6, 2026
Merged

AamiriYouness merged 5 commits into
mainfrom
chore/v0.4.x-stabilization

Conversation

@AamiriYouness

@AamiriYouness AamiriYouness commented Aug 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Closes out the v0.4.x stabilization checklist before starting v0.5
(History) work: CI now runs on all three OSes with real coverage
collection and a Codecov badge, and a new BenchmarkGate.IntegrationTests
project proves the actual packed, installed tool works end to end --
not just the code that builds it.

What's in this PR

  • ci.yml: ubuntu/windows/macos matrix, coverage collection every leg,
    Codecov upload + local HTML report artifact from the ubuntu leg
  • coverlet.runsettings: excludes test assemblies from their own coverage
  • BenchmarkGate.IntegrationTests: real subprocess-level E2E tests against
    the packed tool (pack -> install -> invoke), no ProjectReferences to
    source projects
  • README: Codecov badge
  • docs/ROADMAP.md: v0.4.0 marked shipped, new v0.4.x stabilization
    section

Setup required (not part of this PR's diff, but blocking for it to work)

Design notes

  • E2E tests deliberately have zero ProjectReference to Core/Tool/etc --
    the whole point is proving the shipped NuGet artifact works, with no
    compile-time coupling to internal APIs that could make a test pass
    without the real thing actually working.
  • Coverage upload only happens once (ubuntu leg) to avoid triple-counting
    identical managed-code coverage across platforms that don't meaningfully
    differ for coverlet's purposes.
  • First run (local or CI) will be noticeably slower -- each OS leg does a
    real dotnet pack + dotnet tool install before any E2E assertion runs.

Testing checklist

  • dotnet slnx add + dotnet test passes locally
  • CI matrix green on all three OSes
  • Codecov upload succeeds (check the Actions log + app.codecov.io
    dashboard)
  • Coverage badge renders a real percentage in the README once merged

build-and-test now runs on ubuntu-latest, windows-latest, and macos-latest
via a strategy matrix instead of ubuntu-only -- BenchmarkGate is installed
via 'dotnet tool install' on all three, so a single-OS CI run never
actually proved it's portable.

Every leg collects coverage via --collect:\"XPlat Code Coverage\" with a
new coverlet.runsettings excluding test assemblies from their own
coverage numbers. Only the ubuntu-latest leg uploads to Codecov and
generates a local HTML report artifact (ReportGenerator), to avoid
triple-counting the same managed-code coverage across platforms.
…-m "New test project with zero ProjectReferences to Core/Tool/etc -- it only

ever talks to the real, packed, installed benchmark-gate executable as a
subprocess (ToolInstallFixture: dotnet pack -> dotnet tool install -->
Process.Start), never an in-process Command.Run() call. Self-contained:
identical behavior via 'dotnet test' locally and in CI, no bespoke CI-side
pack step required.

7 tests: --version/--help, full capture-then-compare pipeline, full
capture-then-check pipeline, compare --format json file output, validate
against a malformed policy (expects ValidationFailed=12), check against
nonexistent paths (expects UnsupportedSchema=8). Uses the same real,
trimmed BenchmarkDotNet fixture already used by CompareCommandTests.

Not yet wired into BenchmarkGate.sln -- run:
dotnet sln add tests\BenchmarkGate.IntegrationTests\BenchmarkGate.IntegrationTests.csproj
Marks v0.4.0 -- Comparison as shipped and adds a v0.4.x -- stabilization
checklist before v0.5 (History) work starts, modeled directly on the
existing v0.2.x stabilization section: coverage measured in CI, tests
running on all three OSes, real end-to-end tests against the packed tool,
release pipeline confirmed working (already true -- release.yml), and a
visible coverage badge.

README gets the Codecov badge in the existing badge row.
FindRepoRoot() hardcoded a check for BenchmarkGate.sln, which no longer
exists now that the solution file is BenchmarkGate.slnx -- the fixture
would throw immediately on InitializeAsync for every test. Checks for
both extensions defensively, so this keeps working regardless of which
format is present.
Project coverage checked against main with a 1% drop tolerance; patch
(diff) coverage on new/changed lines requires 80%. Both post as blocking
(non-informational) status checks and a PR comment showing the
comparison -- actually enforcing them as merge blockers still needs
codecov/project and codecov/patch added as required status checks in
GitHub's branch protection settings for main, which codecov.yml alone
can't do.

ignore: tests/** matches coverlet.runsettings' exclusion, so Codecov and
the local HTML report agree on what counts as coverage.
@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

@AamiriYouness
AamiriYouness merged commit a629db2 into main Aug 6, 2026
4 checks passed
@AamiriYouness
AamiriYouness deleted the chore/v0.4.x-stabilization branch August 6, 2026 14:39
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