Repository navigation
chore: v0.4.x stabilization — CI matrix, coverage, real E2E test - #40
Merged
Merged
Conversation
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.
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 ☂️ |
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.
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
Codecov upload + local HTML report artifact from the ubuntu leg
the packed tool (pack -> install -> invoke), no ProjectReferences to
source projects
section
Setup required (not part of this PR's diff, but blocking for it to work)
https://app.codecov.io/account/gh/Bijecta/org-upload-token)
dotnet sln add tests\BenchmarkGate.IntegrationTests\BenchmarkGate.IntegrationTests.csprojrun locally before this can build in CI
Design notes
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.
identical managed-code coverage across platforms that don't meaningfully
differ for coverlet's purposes.
real dotnet pack + dotnet tool install before any E2E assertion runs.
Testing checklist
dashboard)