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: 26 additions & 6 deletions .github/actions/full-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,31 @@ runs:
with:
dotnet-version: 10.0.x

- name: Install WiX v6
# Release, not the default Debug: shipped code has #if DEBUG blocks (log level, the update check, drive scanning), so a Debug-only run says nothing about the binaries users get.
- name: Build
shell: bash
run: |
dotnet tool install --global wix --version 6.0.*
run: dotnet build -c Release

- name: Build
# AGENTS.md requires `dotnet format`, and without a gate the rule gets missed.
# Runs after Build so a compile error is reported first: format's analyzers give a much worse message on a tree that doesn't compile.
- name: Verify formatting
shell: bash
run: dotnet build
run: dotnet format --verify-no-changes --no-restore

# --blame-hang is an inactivity timeout on the test host: a deadlocked dispatcher call is not covered by the suite's polling deadlines, and without this a hang regression burns the runner's entire budget instead of failing in minutes with the offending test named.
# The whole suite finishes in seconds, so 5m cannot fire on a healthy run.
- name: Test
shell: bash
run: dotnet test
run: dotnet test -c Release --no-build --blame-hang --blame-hang-timeout 5m --logger "trx;LogFileName=test-results.trx" --results-directory TestResults

# Explicitly named so it doesn't collide with the unnamed publish artifact below, and kept as its own step so that one can keep if-no-files-found:error without a failed test run, which never reaches the publish step, tripping it on an empty directory.
- name: Upload test results
if: always()
uses: actions/upload-artifact@v7
with:
name: test-results
path: TestResults/**
if-no-files-found: ignore

- name: Create Binaries
shell: bash
Expand All @@ -45,6 +58,13 @@ runs:
Compress-Archive -Path "publish/$arch/*" -DestinationPath "publish/SentryDeck-${{ inputs.version }}-$arch.zip"
}

# Installed here rather than up front so build, format, and test failures short-circuit ahead of the tool install.
# setup-dotnet keeps ~/.dotnet/tools on PATH for the whole job.
- name: Install WiX v6
shell: bash
run: |
dotnet tool install --global wix --version 6.0.*

- name: Create MSI Installers
shell: bash
run: |
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ on:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

# Superseded runs are cancelled, including on main.
# That's safe here specifically because this workflow's artifacts are never consumed: releases are built by the tag-triggered deploy.yml.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read
Expand All @@ -14,5 +21,5 @@ jobs:
runs-on: windows-2025
steps:
- uses: actions/checkout@v5

- uses: ./.github/actions/full-build
7 changes: 7 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ These instructions apply to Codex and other coding agents working in this repo.
- Follow `.editorconfig` naming and formatting rules.
- Use `ObservableProperty`/`RelayCommand` (CommunityToolkit.Mvvm) for view-model state and commands.

## Comments
- Break comment lines at sentence boundaries, one sentence per line, however long the line gets. Never wrap a sentence at a column width: editing one word would reflow every line after it and bury the real change in the diff.
- This applies to every file type, including YAML in `.github/`, not just C#.
- Don't use em dashes. A colon, semicolon, comma, or a second sentence reads the same and survives copy/paste.
- Explain why the behavior matters, not what the code does.

## WPF-specific considerations
- Be mindful of dispatcher usage when touching UI from background tasks.
- Prefer `INotifyPropertyChanged` patterns over manual UI updates.
Expand All @@ -34,5 +40,6 @@ These instructions apply to Codex and other coding agents working in this repo.
## Testing/Validation
- Always run `dotnet format`.
- Tests live in `SentryDeck.Tests` and use xUnit/Shouldly.
- Name tests `Subject_Scenario_Expectation` on a `public sealed class` with instance methods.
- Add tests for new view-model and domain logic — view-models are plain objects that can be constructed directly in tests (see `MainWindowViewModelTests`).
- If you change UI behavior, mention how to verify it (e.g., which view to open, what to click).