From 3c03c1bcf6be0ffdfee3917931548746c420f221 Mon Sep 17 00:00:00 2001 From: quality-zero-platform drift-sync Date: Wed, 18 Nov 2026 08:20:23 +0200 Subject: [PATCH] chore(drift-sync): apply template updates --- ci-fragments/setup-node.yml | 4 ++++ ci-fragments/setup-python.yml | 4 ++++ ci.yml | 44 +++++++++++++++++++++++++++++++++++ codecov.yml | 18 ++++++++++++++ coverage-thresholds.json | 6 +++++ dependabot.yml | 21 +++++++++++++++++ 6 files changed, 97 insertions(+) create mode 100644 ci-fragments/setup-node.yml create mode 100644 ci-fragments/setup-python.yml create mode 100644 ci.yml create mode 100644 codecov.yml create mode 100644 coverage-thresholds.json create mode 100644 dependabot.yml diff --git a/ci-fragments/setup-node.yml b/ci-fragments/setup-node.yml new file mode 100644 index 00000000..9a0ab06f --- /dev/null +++ b/ci-fragments/setup-node.yml @@ -0,0 +1,4 @@ + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: "22" diff --git a/ci-fragments/setup-python.yml b/ci-fragments/setup-python.yml new file mode 100644 index 00000000..5bd60308 --- /dev/null +++ b/ci-fragments/setup-python.yml @@ -0,0 +1,4 @@ + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" diff --git a/ci.yml b/ci.yml new file mode 100644 index 00000000..921a4940 --- /dev/null +++ b/ci.yml @@ -0,0 +1,44 @@ +name: .NET WPF CI + +permissions: + contents: read + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +concurrency: + group: dotnet-wpf-ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + - name: Set up .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: "8.0.x" + - name: Restore + run: dotnet restore + - name: Build + run: dotnet build --no-restore --configuration Release + - name: Test with coverage + shell: bash + run: | + pwsh -ExecutionPolicy Bypass -File ./tools/quality/collect-dotnet-coverage.ps1 -Configuration Release -DeterministicOnly +$candidates = @( + (Join-Path (Get-Location) 'TestResults/coverage/cobertura.xml'), + (Join-Path (Get-Location) 'tests/SwfocTrainer.Tests/TestResults/coverage.cobertura.xml'), + (Join-Path (Get-Location) 'TestResults/coverage.cobertura.xml') +) +$resolved = $candidates | Where-Object { Test-Path -Path $_ } | Select-Object -First 1 +if (-not $resolved) { + throw "Coverage report not found. Checked: $($candidates -join '; ')" +} +Write-Host "Using coverage report: $resolved" diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..8f738bb1 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,18 @@ +codecov: + require_ci_to_pass: true + +flags: + dotnet: + paths: + - TestResults/ + +coverage: + status: + project: + default: + target: 100.0% + threshold: 0% + patch: + default: + target: 100.0% + threshold: 0% diff --git a/coverage-thresholds.json b/coverage-thresholds.json new file mode 100644 index 00000000..ce6c5db8 --- /dev/null +++ b/coverage-thresholds.json @@ -0,0 +1,6 @@ +{ + "branches": 100.0, + "functions": 100.0, + "lines": 100.0, + "statements": 100.0 +} diff --git a/dependabot.yml b/dependabot.yml new file mode 100644 index 00000000..b1ec49e9 --- /dev/null +++ b/dependabot.yml @@ -0,0 +1,21 @@ +version: 2 +updates: + - package-ecosystem: nuget + directory: "/" + schedule: + interval: weekly + open-pull-requests-limit: 10 + groups: + minor-patch: + applies-to: version-updates + patterns: + - "*" + update-types: + - patch + - minor + security-updates: + applies-to: security-updates + patterns: + - "*" + labels: + - dependencies