Repository navigation
Compile public documentation snippets in CI #2874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,6 +39,7 @@ jobs: | |
| timeout-minutes: 5 | ||
| outputs: | ||
| code: ${{ github.event_name != 'pull_request' && 'true' || steps.filter.outputs.code }} | ||
| docs: ${{ github.event_name != 'pull_request' && 'true' || steps.filter.outputs.docs }} | ||
| steps: | ||
| - name: Filter changed paths | ||
| id: filter | ||
|
|
@@ -73,6 +74,46 @@ jobs: | |
| - 'nuget.config' | ||
| - '.editorconfig' | ||
| - '.gitattributes' | ||
| docs: | ||
| - 'README.md' | ||
| - 'docs/docs/**' | ||
| - 'src/**' | ||
| - 'tests/Dekaf.DocTests/**' | ||
| - 'Directory.Build.props' | ||
| - 'Directory.Build.targets' | ||
| - 'Directory.Packages.props' | ||
| - '.github/workflows/ci.yml' | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a PR adds or changes only Useful? React with 👍 / 👎. |
||
|
|
||
| doc-snippets: | ||
| name: Documentation Snippets | ||
| needs: changes | ||
| if: needs.changes.outputs.docs == 'true' | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| permissions: | ||
| contents: read | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Setup .NET | ||
| uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 | ||
| with: | ||
| dotnet-version: ${{ env.DOTNET_VERSION }} | ||
| dotnet-quality: 'preview' | ||
|
|
||
| - name: Cache NuGet packages | ||
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6 | ||
| with: | ||
| path: ~/.nuget/packages | ||
| key: nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj', '**/Directory.Packages.props', '**/Directory.Build.props', '**/Directory.Build.targets') }} | ||
| restore-keys: nuget-${{ runner.os }}- | ||
|
|
||
| - name: Compile documentation snippets | ||
| run: dotnet run --project tests/Dekaf.DocTests --configuration Release --framework net10.0 -- --repository-root . | ||
|
|
||
| nuget-audit: | ||
| name: NuGet Vulnerability Audit | ||
|
|
@@ -122,7 +163,7 @@ jobs: | |
| if-no-files-found: warn | ||
| retention-days: 30 | ||
|
|
||
| # The ONLY job that compiles the solution. Runs net10.0 unit tests inline and | ||
| # The ONLY job that compiles the full solution. Runs net10.0 unit tests inline and | ||
| # ships the built test binaries to every downstream test job as one tarball | ||
| # (tar preserves the apphost executable bit; single-file upload is fast). | ||
| build: | ||
|
|
@@ -785,7 +826,7 @@ jobs: | |
| # release-only jobs skip on PR runs). | ||
| ci-passed: | ||
| name: CI Passed | ||
| needs: [changes, build, unit-net8, leak-gates-debug, integration, eventhubs-integration, aot-smoke, aot-integration-publish, aot-integration-smoke, release-matrix, release-matrix-aot, publish, code-quality, nuget-audit] | ||
| needs: [changes, doc-snippets, build, unit-net8, leak-gates-debug, integration, eventhubs-integration, aot-smoke, aot-integration-publish, aot-integration-smoke, release-matrix, release-matrix-aot, publish, code-quality, nuget-audit] | ||
| if: always() | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The inspected
doc-snippetsjob is controlled by thisdocsoutput, but.github/workflows/ci.ymlis absent from the allowlist. Consequently, a PR that changes only the job's command or setup marksdoc-snippetsas skipped; the separatecodefilter runs the full solution, which does not includeDekaf.DocTests, andci-passedexplicitly accepts skipped jobs. Include this workflow among the docs inputs so changes to the gate itself are exercised.Useful? React with 👍 / 👎.