Add CI workflow to validate builds on PRs#13
Conversation
Builds the solution and installer, then runs integration tests: installs silently, verifies the exe exists, checks the process starts, validates the single-instance mutex, and confirms a second instance exits immediately.
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions CI workflow to validate ClipPing builds and basic runtime behavior on pull requests, complementing the existing release workflow.
Changes:
- Build
src\ClipPing.slnin Release/x64 on Windows runner. - Build the Inno Setup installer, perform a silent install, and validate the installed EXE exists.
- Run lightweight integration checks: process launches, mutex exists, and single-instance behavior is enforced.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Write-Host "Single instance enforced: second instance exited (code $($proc.ExitCode)), 1 process running" | ||
|
|
||
| - name: Stop ClipPing | ||
| if: always() |
There was a problem hiding this comment.
The Stop ClipPing step is running under the default Windows shell (PowerShell), but the command uses cmd.exe-specific syntax (exit /b 0). In PowerShell this will error and can fail the job during cleanup. Set shell: cmd for this step or rewrite the command in PowerShell (e.g., ignore non-zero exit code explicitly).
| if: always() | |
| if: always() | |
| shell: cmd |
| - name: Verify mutex exists | ||
| shell: pwsh | ||
| run: | | ||
| $mutexName = "Local\ClipPing_SingleInstance" |
There was a problem hiding this comment.
The mutex name being checked here (Local\ClipPing_SingleInstance) doesn’t match the name used by the app (CreateMutex(..., L"ClipPing_SingleInstance")). To avoid false negatives and keep the workflow coupled to the actual implementation, consider using the exact same name string as the app (or document why the Local\ prefix is required).
| $mutexName = "Local\ClipPing_SingleInstance" | |
| $mutexName = "ClipPing_SingleInstance" |
Builds the solution and installer, then runs integration tests: installs silently, verifies the exe exists, checks the process starts, validates the single-instance mutex, and confirms a second instance exits immediately.