Skip to content

Commit c6cd04a

Browse files
committed
ci(dotnet): install docfx on ubuntu leg for docs e2e
RouteCheckTests.OneTimeSetUp runs `npm run build` in docs/ when the VitePress dist tree is missing, which invokes the prebuild hook `npm run regen` → `bash scripts/generate-api-ref.sh` → `docfx metadata`. The build-test-coverage runner had no docfx, so the ubuntu-latest E2E leg failed with "docfx not found on PATH and ~/.dotnet/tools/docfx is missing" — see PR #181 run 26831500675 job 79113784371. The Docs-site workflow already installs docfx in its Prepare job for the same reason; mirror it on the dotnet matrix's ubuntu leg. The windows-latest leg excludes Category=E2E via testFilter so docfx is not needed there.
1 parent 435fcd0 commit c6cd04a

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/dotnet.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,21 @@ jobs:
7979
cache: npm
8080
cache-dependency-path: docs/package-lock.json
8181

82+
# `npm run build` in docs/ invokes the `prebuild` hook
83+
# (`npm run regen`), which calls `bash scripts/generate-api-ref.sh`
84+
# → `docfx metadata` to produce the /api/ reference tree the
85+
# VitePress site consumes. The Docs-site workflow installs docfx
86+
# in its Prepare job; this workflow's E2E leg needs it for the
87+
# same reason. Only the ubuntu-latest leg runs Category=E2E
88+
# (windows-latest excludes it via testFilter), so docfx is only
89+
# required there. Without this, RouteCheckTests.OneTimeSetUp
90+
# fails with "docfx not found on PATH and ~/.dotnet/tools/docfx
91+
# is missing" — see PR #181 run 26831500675 job 79113784371.
92+
- name: Install docfx (docs e2e prerequisite)
93+
if: matrix.os == 'ubuntu-latest'
94+
run: dotnet tool install -g docfx
95+
shell: bash
96+
8297
- name: Restore dotnet tools (ReportGenerator)
8398
run: dotnet tool restore
8499

0 commit comments

Comments
 (0)