ci: build the .NET and Python onboarding examples - #66
Open
mikemcdougall wants to merge 1 commit into
Open
Conversation
README and docs/getting-started advertise running all three example apps, but CI only built the JavaScript example (examples-javascript). The examples/dotnet and examples/python onboarding samples had zero CI coverage and could silently break against schema or API changes — the same regression risk the JS-example job was added to prevent. Add two cheap jobs that mirror examples-javascript: - examples-dotnet: dotnet build examples/dotnet/GeospatialExample.csproj. The csproj compiles the protos directly via Grpc.Tools, so this is a restore+build with no buf/network codegen. Verified locally: build succeeds with 0 warnings/errors. - examples-python: install requirements, buf generate the Python stubs into examples/python (matching the documented generate -> copy gen/python/* flow), then import-check main.py and the generated modules it imports. Verified locally: generation succeeds and the imports resolve. Both jobs are wired into the notify gate. This catches drift such as the example pinning a different Grpc.Net.Client version than getting-started/the smoke test. Finding: .github/workflows/ci.yml — dotnet/python examples advertised but never built in CI.
| uses: actions/checkout@v7 | ||
|
|
||
| - name: Setup .NET | ||
| uses: actions/setup-dotnet@v5 |
| - name: Setup .NET | ||
| uses: actions/setup-dotnet@v5 | ||
| with: | ||
| dotnet-version: ${{ env.DOTNET_VERSION }} |
| echo "${RUNNER_TEMP}" >> "$GITHUB_PATH" | ||
|
|
||
| - name: Setup Python | ||
| uses: actions/setup-python@v5 |
| # (generate -> copy gen/python/* next to main.py -> import). | ||
| - name: Install Example Dependencies | ||
| run: pip install -r examples/python/requirements.txt | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The README and
docs/getting-started.mdprominently advertise running all three example apps:But CI only built the JavaScript example (
examples-javascript). Theexamples/dotnetandexamples/pythononboarding samples had zero CI coverage and could silently break against schema or API changes — the exact regression the JS-example job exists to prevent. (For instance, the dotnet example can drift to a differentGrpc.Net.Clientversion than getting-started / the smoke test.)Change
Add two cheap jobs mirroring
examples-javascript:examples-dotnet—dotnet build examples/dotnet/GeospatialExample.csproj. The csproj compiles the protos directly viaGrpc.Tools, so this is a restore+build with no buf/network codegen.examples-python— installrequirements.txt,buf generatethe Python stubs intoexamples/python(matching the documented generate → copygen/python/*flow), then import-checkmain.pyplus the generated modules it imports.Both jobs are wired into the
notifysuccess gate.Verification (local)
dotnet build examples/dotnet/GeospatialExample.csproj --configuration Release→ Build succeeded. 0 Warning(s) 0 Error(s).buf generate --template buf.gen.python.yaml --output examples/python→ stubs generated; import-check printspython example imports resolve.ci.ymlparses as valid YAML; job graph intact.Finding addressed
.github/workflows/ci.yml— .NET/Python examples advertised with run commands but never built/run in CI.