Skip to content

feat(csharp-publish): add working-directory + test-filter inputs - #11

Merged
monsieurleberre merged 2 commits into
devfrom
feat/publish-working-directory-input
Jun 7, 2026
Merged

feat(csharp-publish): add working-directory + test-filter inputs#11
monsieurleberre merged 2 commits into
devfrom
feat/publish-working-directory-input

Conversation

@monsieurleberre

@monsieurleberre monsieurleberre commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Pre-open

  • pre-open review completed — findings addressed locally

Multi-agent pre-open review (thorough). Addressed before review:

  • Renamed working_directory/test_filterworking-directory/test-filter to match the hyphenated input convention already used by csharp-ci.yaml, scala-ci.yaml, and terraform-ci.yaml.
  • Hardened the Test step with set -euo pipefail to match the other multi-line steps.

Verified by reviewers: pack output ($GITHUB_WORKSPACE/output/nuget) lines up with the root-level upload + nuget.org push steps for both . and a sub-path; test failures still fail the job; existing callers remain bit-for-bit unaffected.

What

Two backward-compatible inputs on the reusable csharp-publish-public.yaml:

  • working-directory (default .) — runs the restore/build/test/pack steps from a sub-path so a repo whose solution lives below the root (e.g. canton-localnet's csharp/) can consume this workflow. Pack output moves to $GITHUB_WORKSPACE/output/nuget so the root-level upload + nuget.org push steps are unaffected.
  • test-filter (default empty) — passes a dotnet test --filter expression (e.g. Category!=Integration) to exclude tests that need live infrastructure.

Why

Wiring canton-localnet's public mirror to publish Peaceful.Canton.Localnet.Testing to nuget.org via this shared workflow. Its C# project lives in csharp/ and its integration tests (Category=Integration) need a running LocalNet, so the root-only / unfiltered assumptions didn't fit.

Compatibility

Both inputs default to prior behaviour — dotnet-extensions and any other caller are bit-for-bit unaffected. Requires the usual governed @v1 retag after merge.

Lets repos whose solution lives below the repo root (e.g.
canton-localnet's csharp/) use the reusable publish workflow, and
exclude infra-dependent tests via a dotnet test --filter expression.
Both inputs default to prior behaviour, so existing callers are
bit-for-bit unaffected. Pack output moves to $GITHUB_WORKSPACE/output
so the root-level upload/push steps are unaffected by working_directory.
Copilot AI review requested due to automatic review settings June 7, 2026 18:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Rename working_directory/test_filter to working-directory/test-filter so
the publish workflow's inputs match the hyphenated names already used by
csharp-ci.yaml, scala-ci.yaml and terraform-ci.yaml. Also harden the Test
step with set -euo pipefail to match the other multi-line steps.
@monsieurleberre monsieurleberre changed the title feat(csharp-publish): add working_directory + test_filter inputs feat(csharp-publish): add working-directory + test-filter inputs Jun 7, 2026
@monsieurleberre
monsieurleberre merged commit 86bd4d0 into dev Jun 7, 2026
2 checks passed
@monsieurleberre
monsieurleberre deleted the feat/publish-working-directory-input branch June 7, 2026 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants