Skip to content

ci: test on macOS and Windows, and actually run go test#308

Merged
nimish-ks merged 1 commit into
phasehq:mainfrom
sundaram2021:ci/add-macos-windows-test-matrix
Jul 6, 2026
Merged

ci: test on macOS and Windows, and actually run go test#308
nimish-ks merged 1 commit into
phasehq:mainfrom
sundaram2021:ci/add-macos-windows-test-matrix

Conversation

@sundaram2021

Copy link
Copy Markdown
Contributor

What

Expands the reusable test workflow (.github/workflows/test.yml) to run on
Linux, macOS, and Windows via an OS matrix, and adds a real go test ./...
step (the job was named "Go Test & Vet" but only ran go vet + a build check).

Resolves #307

Why

  • We ship macOS and Windows binaries via GoReleaser but only tested on
    ubuntu-latest, so platform-specific regressions (keyring, paths, terminal
    handling) could ship unnoticed — see CLI is broken on windows git bash #80.
  • The suite wasn't being executed at all, on any OS.

Changes

  • Add matrix os: [ubuntu-latest, macos-latest, windows-latest] with
    fail-fast: false.
  • Add a go test ./... step.
  • Make the build step cross-platform: move CGO_ENABLED=0 to a job-level
    env: block (the inline VAR=value prefix is bash-only and breaks on
    Windows' default PowerShell), and replace go build -o /dev/null ./ with
    go build ./... (/dev/null doesn't exist on Windows).

Since test.yml is called by both main.yml and release.yml, this covers
PR CI and the release gate in one change.

Testing

  • go test ./... passes locally — 30 tests across cmd, pkg/ai,
    pkg/config, pkg/util.
  • GOOS=windows go vet ./... and GOOS=windows go build ./... are clean.
  • CI on this PR now runs the suite on all three OSes.

@sundaram2021

Copy link
Copy Markdown
Contributor Author

please review it and let me know if any changes needed

@nimish-ks nimish-ks self-requested a review July 6, 2026 12:36
@nimish-ks nimish-ks merged commit b4e41bc into phasehq:main Jul 6, 2026
4 checks passed
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.

Add macOS and Windows runners to the CI test matrix

2 participants