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
4 changes: 4 additions & 0 deletions ci-fragments/setup-node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
4 changes: 4 additions & 0 deletions ci-fragments/setup-python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
44 changes: 44 additions & 0 deletions ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: .NET WPF CI

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Apply the synced templates to the active GitHub config paths

GitHub Actions discovers workflows under .github/workflows/, so this root-level ci.yml never runs on either of its declared events. At the reviewed commit, .github/workflows/ci.yml still contains the previous pipeline, and a repository-wide reference search found no mechanism that consumes or copies this new file. The same destination problem affects the added root-level dependabot.yml: GitHub continues using the unchanged .github/dependabot.yml, so the new security-update grouping is not applied. Map these templates to their actual configuration destinations and reconcile them with the existing files rather than adding inactive root-level copies.

Useful? React with 👍 / 👎.


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"
Comment on lines +34 to +44

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The "Test with coverage" step in ci.yml has broken YAML indentation and attempts to execute PowerShell code under shell: bash.
Severity: LOW

Suggested Fix

Fix indentation for lines 35–44 to align within the run: | block, and change the step's shell to shell: pwsh (or extract the PowerShell commands into a script executed via pwsh).

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: ci.yml#L33-L44

Potential issue: In `ci.yml`, the "Test with coverage" step contains YAML indentation
and shell syntax errors. Lines 35–44 lose the indentation required by the `run: |`
scalar, starting at column 0 with a plain scalar (`$candidates = @(...)`) that causes a
YAML parsing error. Furthermore, lines 35–44 contain PowerShell script syntax while the
step is explicitly configured with `shell: bash`, which would fail execution even if
indentation were resolved.

Did we get this right? 👍 / 👎 to inform future reviews.

18 changes: 18 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -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%
6 changes: 6 additions & 0 deletions coverage-thresholds.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"branches": 100.0,
"functions": 100.0,
"lines": 100.0,
"statements": 100.0
}
21 changes: 21 additions & 0 deletions dependabot.yml
Original file line number Diff line number Diff line change
@@ -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
Loading