Repository navigation
ci: sync Stage 1 coverage gate and build-pr.ps1 local tools from repo-template - #313
Merged
Merged
Conversation
…-template Stage 1 now runs every test project (integration included), records the assemblies that ran, fails "Check for coverage files" when tests ran but produced no coverage, and fails the gate for an assembly that ran without a coverage row (Chris-Wolfgang/repo-template#654). build-pr.ps1 runs ReportGenerator and DevSkim as pinned local tools through a Restore-LocalTools helper, and a DevSkim non-zero exit fails the step (Chris-Wolfgang/repo-template#656). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The changes correctly implement the linked template updates without introducing unresolved issues.
Review effort: Balanced
Findings: None
What changed in this PR
Syncs protected CI tooling with the repository template to prevent silent coverage and security-scan passes.
Changes:
- Tracks executed test assemblies and fails when coverage is missing.
- Uses pinned local ReportGenerator and DevSkim tools.
- Propagates DevSkim execution failures.
| File | Description |
|---|---|
.github/workflows/pr.yaml |
Strengthens Stage 1 test and coverage enforcement. |
scripts/build-pr.ps1 |
Restores and runs pinned local analysis tools. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…-template#701) Windows runners cannot run the Linux containers integration suites need; Stage 1 runs and gates them. A TFM no Linux stage runs is still reported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… (repo-template#702) Drops class-level filters; ExcludeByFile/ExcludeByAttribute are comma-separated so *.g.cs and [GeneratedCode] are actually excluded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 22, 2026
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.
Part of #307
Configuration-only PR (protected files only): syncs two merged repo-template changes.
Changes
.github/workflows/pr.yaml(Stage 1) — from Chris-Wolfgang/repo-template#654 (48c7e2b)-not -name "*.Tests.Integration.*"exclusion and its "excluded from the coverage gate" notice are removed.<AssemblyName>or the project file basename) to$RUNNER_TEMP/stage1-ran-test-assemblies.txt.coverage.cobertura.xmlwas produced (previously it sethas-coverage=falseand every later coverage step was skipped, green).CoverageReport/Summary.txt(exact module-name match, not a prefix match).scripts/build-pr.ps1— from Chris-Wolfgang/repo-template#656 (2151df4)Restore-LocalToolshelper (dotnet tool restoreonce per run).dotnet reportgenerator,dotnet devskim) instead of global lookups with unversioneddotnet tool install -gfallbacks.Adaptations
None. Both template hunks applied with
git apply(line offsets only, no conflicts); repo-specific content is untouched.Verification (local, no CI)
pr.yamlparses with PyYAML (9 jobs).run:step extracted with its resolved shell: 29 bash steps passbash -n, 9 pwsh steps parse with 0 errors.shell: bash(pipefail), so the newasm=$(grep ... || true)line is guarded for the no-<AssemblyName>case; "Check for coverage files" and "Enforce 90% coverage threshold" run under the implicitbash -e(no pipefail) and add no pipelines whose status matters.asm=extraction was run underset -eo pipefailagainst a csproj with and without<AssemblyName>, and theawkrow check against a summary where one module name is a prefix of another.scripts/build-pr.ps1parses with 0 errors;.config/dotnet-tools.jsonalready pinsdotnet-reportgenerator-globaltoolandmicrosoft.cst.devskim.cli.On this PR / after merge
pr.yamlhere runs onpull_request, using the PR's own copy of the workflow, so this PR's own Stage 1 already exercises the new gate. The repo has no*.Tests.Integration*project, so the visible change is the new ran-assembly ledger and the two new failure paths.Open Dependabot PR #303 also edits
.github/workflows/pr.yaml(action pins); whichever merges second may need a rebase.Round 2 (2026-10-04)
Two more merged repo-template changes, protected files only:
.github/workflows/pr.yamlStage 2 (Windows):*.Tests.Integration.*projects are skipped after TFM discovery, as on Stage 3. Stage 1 (Linux) runs and gates them. An integration TFM that Stage 1 cannot run still gets the "TFM(s) not covered by any CI stage" warning. Applied withgit applywith no drift. This repo has no integration project today, so nothing is skipped yet.coverlet.runsettings: the file is replaced with the template's, adapting for drift.<Exclude>was already only[*]AutoGeneratedProgram, butExcludeByFilewas;-separated (**/bin/**/*.cs;**/obj/**/*.cs, one pattern that matches nothing), andExcludeByAttributelackedGeneratedCode. Both lists are now comma-separated, with**/*.g.csandGeneratedCodeadded. The AotSmoke-specific comment is replaced by the template's comment.Verified:
pr.yamlparses with PyYAML; the changed Stage 2 step (pwsh) parses with 0 errors.Impact, measured locally (Release, net8.0 + net10.0, #314's head a1aa6ef + each runsettings): no change. src 100%, Tests.DocExamples 100%, Tests.Fuzz 100%, Tests.Unit 100% under both the old and the new file.
Merge order: #314 first, then this PR.
🤖 Generated with Claude Code