Documentation section: Development
Release Flow
This repository uses the shared Purview.Build pipeline for
the full PR/release cycle, and plain dotnet/just commands for focused local work.
Versioning
Section titled “Versioning”package.jsonis the single source of truth for the version. Theversionfield is read by the SDK’s Version Detection logic and applied toVersionandPackageVersionfor every build and pack.- Current package version: read from
package.json(just version;just bump major|minor|patchchanges it).
Local workflow
Section titled “Local workflow”dotnet tool restore # install local tools (csharpier, etc.)just build # dotnet build src/BuildSdk.slnx --configuration Debugjust test # dotnet test with a TUnit tree-node filterjust lint-check # csharpier checkjust lint-fix # csharpier format .just pack # dotnet pack to ./artifactsjust pipeline-pr # restore, build, lint, tests, pack, package validationjust pipeline-local-release # restore, build, lint, tests, pack, local NuGet publishPipeline workflows
Section titled “Pipeline workflows”| Recipe | Purpose |
|---|---|
just pipeline-pr |
PR pipeline — restore, build, lint, tests, pack, package validation. |
just pipeline-build |
Build pipeline — restore, build, lint, pack, package validation (no tests). |
just pipeline-tests |
Tests pipeline — restore, build, lint, tests, pack, package validation, with release explicitly off. |
just pipeline-release |
Release pipeline — restore, build, lint, tests, pack, publish to NuGet, GitHub release. |
just pipeline-local-release |
Release pipeline with a local NuGet publish (--Release:Mode=LocalNuGet). |
just pipeline-pack-validate |
Through pack and package validation, publishing nothing. |
The recipes come from the purview-build.just and purview-build-nuget.just modules in
.build/just/ — see the purview-buildsdk-justfile skill.
Package validation checks each package against PackValidation.RequiredContent: a file a package
ships that the list does not name fails the run as undeclared content, so a new file under
Sdk/ needs an entry there too.
The pipeline configuration lives in .config/purview-build.json. Every Build stage — tests, lint, pack
and pack validation — runs unless the file or a --Build:<Setting>=false argument turns it off:
{ "Build": { "Solution": "src/BuildSdk.slnx", "TestRoot": "src/tests", "TestPatterns": "*Tests.csproj", "TestFilter": "/*/*/*/*/" }, "PackValidation": { "RequiredCompilerFlags": [ "optimization=release" ], "RequireSymbolPackage": false, "RequiredContent": { "purview.buildsdk": [ "analyzers/dotnet/cs/Purview.BuildSdk.Analyzers.dll", "analyzers/dotnet/cs/Purview.BuildSdk.CodeFixers.dll", "purview-logo-light.png", "README.md", "Sdk/.editorconfig", "Sdk/Props/Defaults.props", "Sdk/Props/PackedVersion.props", "Sdk/Props/VersionDetection.props", "Sdk/Sdk.props", "Sdk/Sdk.props.buildschema.json", "Sdk/Sdk.targets", "Sdk/Targets/Blazor.targets", "Sdk/Targets/Modern.targets", "Sdk/Targets/PropertySchema.targets", "Sdk/Targets/ServerShared.targets", "Sdk/Targets/TargetFrameworkOwnership.targets", "Sdk/Targets/VersionDetection.targets" ], "purview.skills.testing": [ "README.md", "lib/$(TFM)/Purview.Skills.Testing.dll", "lib/$(TFM)/Purview.Skills.Testing.xml" ] } }, "Release": { "Mode": "None" }}CI workflows
Section titled “CI workflows”- PRs —
.github/workflows/pr.ymlcalls the sharedpurview-build.ymlworkflow twice: one job builds, lints and packs without tests, and a matrix job runs each test project separately (the matrix lists them by name, so a new test project must be added to it). - Releases —
.github/workflows/release.ymltriggers on pushes tomainand runs the sharedpurview-releasecomposite action withrelease-mode: NuGetand nuget.org Trusted Publishing, optionally mirroring to GitHub Packages. ContinuousIntegrationBuildis set when theCI,GITHUB_ACTIONSorTF_BUILDenvironment variable istrue, for deterministic SourceLink output.
Testing
Section titled “Testing”- Tests use Microsoft.Testing.Platform (
global.jsonsets"runner": "Microsoft.Testing.Platform") and TUnit conventions. - CI runs the full suite on
ubuntu-latest, so all tests and features must work identically on Windows, Linux, and macOS — never hardcode platform-specific paths in tests or fixtures. - The integration harness (
ProjectHarness) creates throwaway projects underPath.GetTempPath(); seesrc/tests/BuildSdk.IntegrationTests/Harness/ProjectHarness.cs. - The SDK integration suite can be run on Linux locally via
just test-linux(Docker-based).