ci: add run-tests composite action + ci workflow on main/release #32
No reviewers
Labels
No labels
bug
commercial
documentation
duplicate
enhancement
feature
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jasoncouture/llama-shears!32
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ci/run-tests-action"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Lays the CI foundation: a reusable composite action that the next two PRs (PR coverage comment, future quality gates) build on top of, plus the
main/release/**/*push trigger.What's in here
.github/actions/run-tests/action.ymlComposite action with four steps:
dotnet restore LlamaShears.slnx— explicit so step 2 can--no-restore.dotnet test LlamaShears.slnx --no-restore --coverage --coverage-output-format cobertura --coverage-output coverage.cobertura.xml. Each test project's MTP runner drops a per-project cobertura under<test-proj>/bin/Debug/net10.0/TestResults/coverage.cobertura.xml.irongut/CodeCoverageSummary@v1— globs all per-project cobertura files, emitscode-coverage-results.md(per-assembly markdown breakdown).actions/upload-artifact@v4— uploadscode-coverage-results.mdas artifactcoverage-summary(if-no-files-found: error).If
dotnet testfails, steps 3 and 4 don't run — by design. Nothing is uploaded from a failing build..github/workflows/ci.ymlTrigger:
pushtomainandrelease/**branches. Singletestjob:actions/checkout@v4withfetch-depth: 0(NBGV needs full history for proper version computation).actions/setup-dotnet@v4pinned to10.0.x../.github/actions/run-testsaction.concurrencygroup keyed to ref withcancel-in-progress: false— release branches deserve to finish.Why a composite action and not job steps inline
PR 3 (PR coverage comment) needs the same restore/test/coverage pipeline; sharing the action means main and PR coverage are computed identically, with one place to update flags. The action also keeps the workflow files tiny — the workflow only adds what's specific to its trigger (PR comment posting in PR 3, push trigger here).
Action-pinning policy
All third-party actions are pinned to a floating major (
@v1,@v4) per repo policy.Test plan
dotnet test LlamaShears.slnx --coverage --coverage-output-format cobertura --coverage-output coverage.cobertura.xmlworks end-to-end without adding extra packages — TUnit/MTP transitively pullsMicrosoft.Testing.Extensions.CodeCoverage.<test-proj>/bin/Debug/net10.0/TestResults/.docs-api-up-to-datepre-push check passed.mainafter merge will exercise the workflow end-to-end. Coverage extension version, ubuntu runner availability, and irongut@v1resolution can only be verified there.Stacking note
This PR targets
feat/public-readme-required(PR #31). Merging order: #31 first, then this PR re-targetsmainautomatically.🤖 Generated with Claude Code
All committers have signed the CLA.
Pull request overview
Introduces an initial CI setup for the repo by adding a reusable composite action to run .NET restore/test with code coverage and a workflow that runs it on pushes to
mainandrelease/**.Changes:
.github/actions/run-testscomposite action to restore, run tests with cobertura coverage output, generate a markdown coverage summary, and upload it as an artifact..github/workflows/ci.ymlworkflow triggered on push tomain/release/**, running the composite action onubuntu-latest.Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
@ -0,0 +7,4 @@- 'release/**'permissions:contents: readThe workflow sets
permissions: contents: readonly, which can preventactions/upload-artifact(invoked by therun-testscomposite action) from creating artifacts. Addactions: writeat the workflow (or job) level, or remove the explicit permissions block so the artifact upload can succeed.