Skip to content

CI: test on Windows again - #9

Open
jvmvik wants to merge 2 commits into
masterfrom
windows-ci
Open

jvmvik wants to merge 2 commits into
masterfrom
windows-ci

Conversation

@jvmvik

@jvmvik jvmvik commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

The README lists Windows as a supported platform (README.md:16), but CI hasn't tested it since 1de42a6 dropped windows-latest without giving a reason. This adds it back.

Changes

  • CI: windows-latest is back in the test matrix. It runs lint, build, unit tests and demos. Live tests stay Linux-only, as they are for macOS.
  • Test: lastError only describes the most recent request accepts error.Unexpected on Windows. Zig 0.16.0's std.Io.Threaded.netConnectIpWindows maps only SUCCESS, CANCELLED and INSUFFICIENT_RESOURCES. STATUS_CONNECTION_REFUSED (0xC0000236) falls through to unexpectedStatus. The test checks that a network error clears lastError(), whatever the error is.

Testing

  • Before the test fix: Windows unit tests 45/46. The one failure was expected error.ConnectionRefused, found error.Unexpected NTSTATUS=0xc0000236 (run 46570967830).
  • After: green on ubuntu, macos, windows and coverage (run 46571379352). The Windows job takes about 1.5 minutes.
  • macOS locally: zig build lint passes, zig build test 46/46.

Note for users

With Zig 0.16.0 on Windows, a refused connection, and possibly other socket errors, comes back as error.Unexpected instead of a specific network error. That is a Zig standard library gap, not something serpapi-zig can map.

🤖 Generated with Claude Code

jvmvik and others added 2 commits November 30, 2026 21:46
The README claims Linux, macOS and Windows support, but 1de42a6 dropped
the Windows job without a stated reason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Zig 0.16.0's std.Io.Threaded.netConnectIpWindows maps only SUCCESS,
CANCELLED and INSUFFICIENT_RESOURCES; STATUS_CONNECTION_REFUSED falls
through to error.Unexpected. The test checks that a transport error
clears lastError(), whichever error it is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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