Skip to content

Commit b735972

Browse files
authored
Say how coverage is gated and how actions are pinned (#76)
## Summary The skills now say what CI actually does. `coverage` explains the gate is checked on the merged report rather than by Coverlet's own threshold, `ci-pipeline` explains how actions are pinned, and `time-provider` notes the token test only exists where there's token authentication. ## Related issues Part of LeanMeanCleanApps/.github#125 ## Type of change - [ ] Bug fix - [ ] New feature - [ ] Breaking change (the generated solution or template parameters change in a way existing users will notice) - [ ] Refactoring or clean-up - [x] Documentation - [ ] Build, pipeline or dependency update ## Shared layers - [ ] This only touches the Presentation layer of this template. - [x] This touches the Application or Infrastructure layers, tests, pipeline or repository setup, so it needs to be carried across all five templates. ## Checklist - [x] `dotnet build` and `dotnet test` pass locally with no warnings. - [ ] I added or updated tests, and line coverage stays at or above 95%. - [ ] I updated the README or docs where behaviour changed. - [x] If this changes how we do something, I updated the matching skill in `.agents/skills`. - [ ] I checked the template still installs and creates a working solution (see CONTRIBUTING.md).
1 parent e0cc359 commit b735972

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎.agents/skills/ci-pipeline/SKILL.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,16 @@ One workflow, `.github/workflows/build-pipeline.yml`, runs on every pull request
2222

2323
After those, Release Check and Publish only run on the monthly release (`releases`).
2424

25+
Actions from GitHub (`actions/*` and `github/*`) are referenced by their major version tag. Actions from anyone else are pinned to a commit SHA with the version in a comment beside it, because the CodeQL scan of the workflows reports an unpinned third-party action. Dependabot keeps both up to date.
26+
2527
A copy made with GitHub's "Use this template" gets this workflow with no secrets or setup. Outside the LeanMeanCleanApps organisation it runs only the format check, build and tests: Static Analysis, Dependency Review, Container Scan, the template's pack and verify steps, Release Check and Publish all check `github.repository_owner` and skip, and the Summary shows them as not run. Skipped jobs count as passed for required checks, so a private copy goes green without Advanced Security. A solution made with `dotnet new` gets the much smaller `template/ci.yml` as `.github/workflows/ci.yml` instead. `ci-for-your-solution` covers both. Keep any new job that needs Advanced Security, a secret or the template folders behind the same owner check.
2628

2729
## Steps
2830

2931
1. Read the Summary comment first; it names the unhappy check and links to its details.
3032
2. Reproduce locally where you can (every command finds the `.slnx` in the root on its own): `dotnet format --verify-no-changes`, `dotnet build`, `dotnet test`, the coverage command in `coverage`, `docker build . --target run`.
3133
3. Fix the cause in the code. For security findings, see `security-findings`.
32-
4. Changing the workflow itself: keep each tool as an off-the-shelf action, keep the job names (they're the required check names), and keep everything working in someone else's copy of the template with no secrets or setup.
34+
4. Changing the workflow itself: keep each tool as an off-the-shelf action (`.github/actions/pipeline-report` is the only one of our own), keep the job names (they're the required check names), and keep everything working in someone else's copy of the template with no secrets or setup.
3335

3436
## Don't
3537

‎.agents/skills/coverage/SKILL.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ metadata:
1111

1212
Total line coverage across every test project, merged into one report, must be at least 95%. The pipeline fails below that, and nobody lowers the number. Coverage comes from Coverlet (`coverlet.msbuild`).
1313

14+
The gate is checked on the merged report, against `COVERAGE_THRESHOLD` in the workflow. Coverlet's own `Threshold` setting isn't used, because it would judge each test project on a partly merged report.
15+
1416
Excluded on purpose, and only these:
1517

1618
| Excluded | How | Why |

‎.agents/skills/time-provider/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ updatedReview.DateModified.ShouldBe(this.database.TimeProvider.GetUtcNow().UtcDa
5252
- Store local times.
5353
- Assert a date with a tolerance ("within a second of now"). Fix the clock and assert the exact value.
5454

55-
The one exception, in a solution with authentication, is the test that creates a token for the real JWT handler, which checks expiry against the system clock (`tests/Presentation.Tests.Integration/Authentication/AuthenticationTests.cs`).
55+
The one exception, in a solution with authentication, is the test that creates a token for the real JWT handler, which checks expiry against the system clock (`tests/Presentation.Tests.Integration/Authentication/AuthenticationTests.cs`, in the templates that have token authentication).
5656

5757
## Check
5858

0 commit comments

Comments
 (0)