Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/.github
diff options
context:
space:
mode:
authorLeitwolf112026-10-03 13:04:35 +0300
committerLeitwolf112026-10-03 13:04:35 +0300
commitca41877fafbac6cffc3e78db1d3306112e8acc60 (patch)
treebd1f7e2e0e177396563da3bd9a9795c54bf65c15 /.github
parent8ba8d26ec4e6e900275fd5cd94e37a7aac701a1f (diff)
downloadprogmaweb-ca41877fafbac6cffc3e78db1d3306112e8acc60.tar.gz
Add a DocFX documentation gate for the API
The backend workflow now builds the API reference with DocFX and treats every warning as an error, so an unresolved reference or a broken link fails the check. - docs/api holds the DocFX project: it reads apps/api/Progmaweb.Api.csproj and includes internal members, because the service is an application and most of its types are internal. - .config/dotnet-tools.json pins docfx 2.81.0, so CI and a local run use the same version through `dotnet tool restore`. - The workflow also runs when the DocFX project or the tool manifest change. - `just api-docs` runs the same two commands locally. - The generated site and metadata are ignored. The gate does not require documentation comments: the API has none yet, and DocFX does not report an undocumented member. Requiring them is a separate change to the C# sources. Verified locally with docfx 2.81.0 on the .NET 10 SDK: the build passes with no warnings, and a broken link in the overview page makes it fail. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/backend.yml9
1 files changed, 9 insertions, 0 deletions
diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml
index 173c5c6..a1f6320 100644
--- a/.github/workflows/backend.yml
+++ b/.github/workflows/backend.yml
@@ -11,6 +11,8 @@ on:
- "apps/api-tests/**"
- "Directory.Build.props"
- "Progmaweb.slnx"
+ - "docs/api/**"
+ - ".config/dotnet-tools.json"
- ".github/workflows/backend.yml"
pull_request:
paths:
@@ -18,6 +20,8 @@ on:
- "apps/api-tests/**"
- "Directory.Build.props"
- "Progmaweb.slnx"
+ - "docs/api/**"
+ - ".config/dotnet-tools.json"
- ".github/workflows/backend.yml"
workflow_dispatch:
@@ -43,6 +47,11 @@ jobs:
- run: dotnet build Progmaweb.slnx --configuration Release --no-restore
- run: dotnet test --project apps/api-tests/Progmaweb.Api.Tests.csproj --configuration Release --no-build --coverlet --coverlet-output-format cobertura
+ # Documentation gate: DocFX reads the API project and builds the
+ # reference; an unresolved reference or a broken link is an error.
+ - run: dotnet tool restore
+ - run: dotnet docfx docs/api/docfx.json --warningsAsErrors
+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: progmaweb-backend-coverage