Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 23 additions & 9 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,25 @@ jobs:
timeout-minutes: 20
steps:
- name: Checkout
uses: codebeltnet/git-checkout@7122f3825d9867b46061afb4bb1de08632dfe561 # v1
uses: codebeltnet/git-checkout@v1
with:
ref: ${{ github.sha }}
- name: Install test SDK
uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5
uses: codebeltnet/install-dotnet@v3
with:
dotnet-version: '11.0.100'
versionPrecision: patch
- name: Run regression and integration tests
shell: pwsh
run: pwsh -NoProfile -File ./tests/csrun.Tests.ps1 -SdkVersion 11.0.100
run: |
$sdkLines = @(& dotnet --list-sdks)
if ($LASTEXITCODE -ne 0) { throw 'Unable to list installed .NET SDKs.' }
$sdk = $sdkLines | ForEach-Object {
if ($_ -match '^(11\.0\.\d+)\s+\[') { $Matches[1] }
} | Sort-Object { [version]$_ } -Descending | Select-Object -First 1
if (-not $sdk) { throw 'Codebelt did not provide a .NET 11 GA SDK.' }
pwsh -NoProfile -File ./tests/csrun.Tests.ps1 -SdkVersion $sdk
- name: Upload tested script
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
uses: actions/upload-artifact@v7
with:
name: csrun-snapshot-${{ github.run_number }}-${{ github.run_attempt }}
path: csrun.ps1
Expand All @@ -43,13 +50,20 @@ jobs:
timeout-minutes: 10
steps:
- name: Checkout
uses: codebeltnet/git-checkout@7122f3825d9867b46061afb4bb1de08632dfe561 # v1
uses: codebeltnet/git-checkout@v1
with:
ref: ${{ github.sha }}
- name: Install minimum test SDK
uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5
uses: codebeltnet/install-dotnet@v3
with:
dotnet-version: '10.0.115'
versionPrecision: patch
- name: Run .NET 10 compatibility tests
shell: pwsh
run: pwsh -NoProfile -File ./tests/csrun.Tests.ps1 -CompatibilityOnly -SdkVersion 10.0.115
run: |
$sdkLines = @(& dotnet --list-sdks)
if ($LASTEXITCODE -ne 0) { throw 'Unable to list installed .NET SDKs.' }
$sdk = $sdkLines | ForEach-Object {
if ($_ -match '^(10\.0\.\d+)\s+\[') { $Matches[1] }
} | Sort-Object { [version]$_ } -Descending | Select-Object -First 1
if (-not $sdk) { throw 'Codebelt did not provide a .NET 10 GA SDK.' }
pwsh -NoProfile -File ./tests/csrun.Tests.ps1 -CompatibilityOnly -SdkVersion $sdk
32 changes: 23 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,25 @@ jobs:
throw 'Release tags must use vMAJOR.MINOR.PATCH, for example v0.1.0.'
}
- name: Checkout tagged commit
uses: codebeltnet/git-checkout@7122f3825d9867b46061afb4bb1de08632dfe561 # v1
uses: codebeltnet/git-checkout@v1
with:
ref: ${{ github.sha }}
- name: Install test SDK
uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5
uses: codebeltnet/install-dotnet@v3
with:
dotnet-version: '11.0.100'
versionPrecision: patch
- name: Run regression and integration tests
shell: pwsh
run: pwsh -NoProfile -File ./tests/csrun.Tests.ps1 -SdkVersion 11.0.100
run: |
$sdkLines = @(& dotnet --list-sdks)
if ($LASTEXITCODE -ne 0) { throw 'Unable to list installed .NET SDKs.' }
$sdk = $sdkLines | ForEach-Object {
if ($_ -match '^(11\.0\.\d+)\s+\[') { $Matches[1] }
} | Sort-Object { [version]$_ } -Descending | Select-Object -First 1
if (-not $sdk) { throw 'Codebelt did not provide a .NET 11 GA SDK.' }
pwsh -NoProfile -File ./tests/csrun.Tests.ps1 -SdkVersion $sdk
- name: Upload tested script
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
uses: actions/upload-artifact@v7
with:
name: csrun-${{ github.ref_name }}
path: csrun.ps1
Expand All @@ -48,16 +55,23 @@ jobs:
timeout-minutes: 10
steps:
- name: Checkout tagged commit
uses: codebeltnet/git-checkout@7122f3825d9867b46061afb4bb1de08632dfe561 # v1
uses: codebeltnet/git-checkout@v1
with:
ref: ${{ github.sha }}
- name: Install minimum test SDK
uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5
uses: codebeltnet/install-dotnet@v3
with:
dotnet-version: '10.0.115'
versionPrecision: patch
- name: Run .NET 10 compatibility tests
shell: pwsh
run: pwsh -NoProfile -File ./tests/csrun.Tests.ps1 -CompatibilityOnly -SdkVersion 10.0.115
run: |
$sdkLines = @(& dotnet --list-sdks)
if ($LASTEXITCODE -ne 0) { throw 'Unable to list installed .NET SDKs.' }
$sdk = $sdkLines | ForEach-Object {
if ($_ -match '^(10\.0\.\d+)\s+\[') { $Matches[1] }
} | Sort-Object { [version]$_ } -Descending | Select-Object -First 1
if (-not $sdk) { throw 'Codebelt did not provide a .NET 10 GA SDK.' }
pwsh -NoProfile -File ./tests/csrun.Tests.ps1 -CompatibilityOnly -SdkVersion $sdk

release:
name: Create draft release
Expand Down
8 changes: 7 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@
- Validate changes with the relevant executable tests and report any validation limits honestly.
- Do not push, create a PR, or publish a release without explicit approval.

## GitHub Actions policy

- Prefer Codebelt actions and reusable workflows whenever they support the required behavior.
- Reference actions and reusable workflows with floating version tags, not commit SHAs.
- Use external actions only where the Codebelt ecosystem has no suitable equivalent.

## .NET support policy

- Use only .NET 10 and later SDKs, runtimes, and application/test target frameworks. Do not introduce .NET 8, .NET 9, or older execution targets.
- Allowed release channels are supported LTS and STS releases, plus preview and go-live releases on .NET 10 or later. Exclude end-of-life channels.
- Verify support status and version choices against Microsoft's authoritative [release index](https://raw.githubusercontent.com/dotnet/core/main/release-notes/releases-index.json), following its per-channel metadata when needed. Do not infer support status from the major version alone.
- Keep selected SDKs and direct NuGet dependencies pinned. Do not silently upgrade packages, retarget examples, or install SDKs at runner execution time.
- CI uses `codebeltnet/install-dotnet@v3` with patch precision to follow the current supported GA SDKs. Test runs select and verify an exact installed SDK for their required channel. Keep direct NuGet dependencies pinned. Do not silently upgrade packages, retarget examples, or install SDKs at runner execution time.
- An omitted framework selects the highest supported GA LTS channel; explicit frameworks are validated against the release index and never silently substituted. The latest preview or go-live channel is allowed only when explicitly requested.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ pwsh -NoProfile -File ./tests/csrun.Tests.ps1 -CompatibilityOnly -SdkVersion 10.

Tests invoke the actual standalone script in child processes, including local scriptblock invocation of the release asset. Fixtures preserve the supplied full DateSpan and Codebelt xUnit examples. DateSpan with Cuemon.Kernel 11.0.0 prints `0 years`, `9 months`, **`40 weeks`**, `273 days`, `6552 hours`, `393,120 minutes`, and `23,587,200 seconds`. Windows is the locally validated platform; paths and process invocation are portable, but Linux/macOS are not yet locally verified.

Both workflows test SDK 11.0.100 and the .NET 10 baseline SDK 10.0.115. The harness writes an isolated `global.json` with roll-forward disabled and verifies the selected SDK, so a newer installed SDK cannot mask minimum-version failures. The compatibility run targets `net10.0` and covers console stdin, forced file execution beside an existing project, and real MTP success, failure, empty discovery, compilation failure, and restore failure.
Both workflows test .NET 11 and .NET 10 channel compatibility using the highest installed GA SDK in each channel after Codebelt SDK setup. The harness writes an isolated `global.json` with roll-forward disabled and verifies that exact selected SDK for each run. CI does not guarantee coverage of the older SDK versions shown in the local commands above or establish minimum SDK version compatibility. The compatibility run targets `net10.0` and covers console stdin, forced file execution beside an existing project, and real MTP success, failure, empty discovery, compilation failure, and restore failure.

Both suites include runs with normal compiler/MSBuild server settings, checking exit codes and removal of csrun's own disposable artifacts. These runs retain the normal host temp location for SDK-managed compiler caches; they neither delete those caches nor shut down unrelated servers. The remaining tests disable server reuse to keep their isolated harness directory disposable. Assertions remove ANSI colors and terminal hyperlinks; raw stdout/stderr remain available for diagnostics. A regression forces MTP's real ANSI formatter and still requires all three Codebelt output lines. The standalone runner preserves the original child output.

The workflows follow the [claude-autoupdate release pattern](https://github.com/gimlichael/claude-autoupdate/tree/main/.github/workflows): PR validation; independent validation of a tagged commit; upload of the tested root script; a separate least-privilege job creating a **draft** release from that artifact. Actions are pinned to commit SHAs. No additional repository secrets are needed. GitHub-hosted workflow execution must be verified after an approved push.
The workflows follow the [claude-autoupdate release pattern](https://github.com/gimlichael/claude-autoupdate/tree/main/.github/workflows): PR validation; independent validation of a tagged commit; upload of the tested root script; a separate least-privilege job creating a **draft** release from that artifact. Workflows prefer Codebelt actions with floating version tags: `codebeltnet/git-checkout@v1` and `codebeltnet/install-dotnet@v3`. CI follows the current supported GA SDKs using patch precision, then selects the highest installed GA SDK for each required channel (.NET 11 and .NET 10) and verifies that exact version during tests. `actions/upload-artifact@v7` handles script artifacts because the Codebelt ecosystem has no suitable equivalent. No additional repository secrets are needed. GitHub-hosted workflow execution must be verified after an approved push.
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Resolved

To make the initial release, after reviewing and approving this local change:

Expand Down