Runtime stability #49
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
| name: Runtime stability | |
| on: | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - "src/**" | |
| - "tests/**" | |
| - ".github/workflows/runtime-stability.yml" | |
| schedule: | |
| - cron: "43 2 * * 2" | |
| workflow_dispatch: | |
| inputs: | |
| iterations: | |
| description: Number of deterministic stability passes | |
| required: true | |
| default: "5" | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: runtime-stability-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| DOTNET_NOLOGO: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| jobs: | |
| runtime-stability: | |
| name: Deterministic multi-stream stability gate | |
| runs-on: windows-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Restore | |
| run: dotnet restore .\ProcessBusSuite.sln | |
| - name: Build | |
| run: dotnet build .\ProcessBusSuite.sln -c Release --no-restore /p:ContinuousIntegrationBuild=true | |
| - name: Repeat deterministic runtime stability suite | |
| shell: pwsh | |
| run: | | |
| $requested = '${{ github.event.inputs.iterations }}' | |
| $iterations = 3 | |
| if (-not [string]::IsNullOrWhiteSpace($requested)) { | |
| $parsed = 0 | |
| if (-not [int]::TryParse($requested, [ref]$parsed)) { | |
| throw "Invalid iterations value: $requested" | |
| } | |
| $iterations = [Math]::Clamp($parsed, 1, 20) | |
| } | |
| New-Item -ItemType Directory -Path .\TestResults\RuntimeStability -Force | Out-Null | |
| Write-Host "Runtime stability iterations: $iterations" | |
| for ($iteration = 1; $iteration -le $iterations; $iteration++) { | |
| Write-Host "=== Runtime stability pass $iteration/$iterations ===" | |
| dotnet test .\tests\ProcessBus.Tests\ProcessBus.Tests.csproj ` | |
| -c Release ` | |
| --no-build ` | |
| --filter "Category=RuntimeStability" ` | |
| --logger "trx;LogFileName=runtime-stability-$iteration.trx" ` | |
| --results-directory .\TestResults\RuntimeStability | |
| if ($LASTEXITCODE -ne 0) { | |
| throw "Runtime stability pass $iteration failed." | |
| } | |
| } | |
| - name: Upload runtime stability evidence | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: runtime-stability-${{ github.run_id }} | |
| path: TestResults/RuntimeStability/** | |
| if-no-files-found: error | |
| retention-days: 30 |