Skip to content

ci: run the test suite on Windows too - #10

Merged
nickolasdeluca merged 3 commits into
mainfrom
ci/windows-job
Aug 26, 2026
Merged

nickolasdeluca merged 3 commits into
mainfrom
ci/windows-job

Conversation

@nickolasdeluca

Copy link
Copy Markdown
Owner

The Windows service, its config seeding and the service runner are all behind //go:build windows, so the ubuntu-only pipeline never compiled them. The bug that made service install read a stale machine-wide config copy sat in one of those files, and its tests could not run anywhere in CI.

Linters stay on the Linux job — staticcheck, gosec and govulncheck are platform-independent.

Opened as a PR rather than pushed straight to main so the new job proves itself (notably -race on Windows) before it lands.

The Windows service, its config seeding and the service runner are all
behind //go:build windows, so an ubuntu-only pipeline never compiled
them. The bug that made 'service install' read a stale machine-wide
config copy sat in one of those files, and its tests could not run
anywhere in CI.

Linters stay on the Linux job: staticcheck, gosec and govulncheck are
platform-independent, and a second pass buys nothing.
InitFileLogger opened the log file and kept the handle for the life of
the process. Windows refuses to delete or replace a file another handle
holds, which failed the logger test outright once the suite started
running there, and left the service holding its log after shutdown.

CloseFileLogger flushes and closes it, a second InitFileLogger closes the
file the first one opened, and the Windows service runner closes the sink
on the way out instead of only syncing it.
gosec flags the bare call. Nothing useful can be done with a failure to
close the outgoing file, and failing the new logger over it would be
worse, so the error is discarded explicitly.
@nickolasdeluca
nickolasdeluca merged commit 4e6c6af into main Aug 26, 2026
2 checks passed
@nickolasdeluca
nickolasdeluca deleted the ci/windows-job branch August 26, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant