ci: add CI pipeline with build, test, coverage, and sticky PR comment #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/add-ci-pipeline"
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
Ports the CI/CD pipeline from
TeamAI/doujin-managertoOpenRouter.Net.What the pipeline does
Runs on push to
mainand PRs targetingmain:dotnet restore+ Release build — fast-fail gatecoverage-report.zipartifact → posts sticky PR coverage commentSticky PR comment
Uses an HTML marker (
<!-- coverage-comment -->) to find/update a single comment on each run, so the coverage summary evolves without spamming the thread. Built from ReportGenerator'sMarkdownSummaryGithuboutput.Adaptation from doujin-manager
The only structural difference:
doujin-managerkeeps its solution underbackend/, whileOpenRouter.Net.slnxlives at the repo root. So theworking-directory: backenddefault was removed — everything else carries over verbatim.No
.csprojchanges needed: all three test projects (OpenRouter.Net.Tests,OpenRouter.Net.Agents.Tests,OpenRouter.Net.Imaging.Tests) already referencecoverlet.collectorvia CPM (Directory.Packages.props).Verified locally
Current coverage baseline: 75.4% line / 64.5% branch (1358/1800 lines, 448/694 branches) across 3 assemblies, 105 classes.
Forgejo-specific notes
https://code.forgejo.org/forgejo/upload-artifact@v4coverage-report.zip(Forgejo serves the name verbatim — no auto.zipappended)/issues/{pr}/comments— PRs share the issue comment namespace)permissions: issues: write, pull-requests: writeon the test job for the token to post commentsSummary
Summary
Coverage
OpenRouter.Net - 68.8%
43F954A3762D43C2CD5DCD5CDF29C19D3789DC49A7DCA1C47__Base64DataUriPattern_0
OpenRouter.Net.Agents - 81.7%
OpenRouter.Net.Imaging - 82.2%