Skip to content

chore(deps): bump the all group across 1 directory with 7 updates #89

chore(deps): bump the all group across 1 directory with 7 updates

chore(deps): bump the all group across 1 directory with 7 updates #89

Workflow file for this run

# Source: verified against docs.github.com/actions/tutorials/build-and-test-code/net
# and github.com/actions/runner-images/issues/13789 (MSBuild pinning)
name: CI
on:
push:
branches: [ main ]
pull_request:
jobs:
build:
runs-on: windows-latest
timeout-minutes: 30
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup .NET 10
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
dotnet-version: '10.0.1xx'
- name: Restore dependencies
run: dotnet restore src/GsdOrchestrator/GsdOrchestrator.csproj
- name: Build
run: dotnet build src/GsdOrchestrator/GsdOrchestrator.csproj --no-restore --configuration Release
- name: Restore test dependencies
run: dotnet restore src/GsdOrchestrator.Tests/GsdOrchestrator.Tests.csproj
- name: Build tests
run: dotnet build src/GsdOrchestrator.Tests/GsdOrchestrator.Tests.csproj --no-restore --configuration Release
- name: Contract compatibility (pinned cas-contracts v1.1)
# Consumer-side gate: fails red if SdlcProfile.CasSdlcV1 or the vendored v1.1
# schema release drifts from the pinned cas-contracts contract. See
# src/GsdOrchestrator.Tests/ContractCompatibilityTests.cs.
run: dotnet test src/GsdOrchestrator.Tests/GsdOrchestrator.Tests.csproj --configuration Release --no-build --filter "FullyQualifiedName~ContractCompatibilityTests"
- name: Test
run: dotnet test src/GsdOrchestrator.Tests/GsdOrchestrator.Tests.csproj --configuration Release --logger trx --no-build --settings coverlet.runsettings --collect:"XPlat Code Coverage" --results-directory ./TestResults
- name: Upload coverage
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: always()
with:
name: coverage-results
path: TestResults/
- name: Enforce branch coverage (ratchet)
shell: pwsh
run: |
# Ratcheted branch-coverage gate (Phase 26-01). Reads branch-rate (NOT
# line-rate) from the cobertura report produced by coverlet's "XPlat
# Code Coverage" collector and fails if it regresses below the last
# measured baseline. Baseline is raised only when new tests push
# coverage strictly higher (see 26-01-SUMMARY.md for history).
$Baseline = 0.7314
$coverageFile = Get-ChildItem -Path TestResults -Recurse -Filter "coverage.cobertura.xml" | Select-Object -First 1
if (-not $coverageFile) {
Write-Output '{"event":"ci_failure","error":"Coverage file not found"}'
exit 1
}
[xml]$xml = Get-Content $coverageFile.FullName
$rate = [double]$xml.coverage.'branch-rate'
$percent = [math]::Round($rate * 100, 2)
$requiredPercent = [math]::Round($Baseline * 100, 2)
if ($rate -lt $Baseline) {
Write-Output "{`"event`":`"ci_failure`",`"metric`":`"branch-rate`",`"coverage_percent`":$percent,`"required`":$requiredPercent}"
exit 1
}
Write-Output "{`"event`":`"ci_success`",`"metric`":`"branch-rate`",`"coverage_percent`":$percent,`"required`":$requiredPercent}"