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
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,10 @@ jobs:
name: build ${{ matrix.goos }}/${{ matrix.goarch }}
runs-on: ubuntu-latest
strategy:
# Every target .goreleaser.yaml ships — a release must not be the first
# thing that compiles a platform.
matrix:
goos: [linux, darwin]
goos: [linux, darwin, windows]
goarch: [amd64, arm64]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*.db-shm
pgrun_metrcis2.mp4
/pgbot
/pgbot.exe

# npm packaging build output (assembled by npm/build.mjs)
npm/staging/
5 changes: 3 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ scripts/gate.sh # the real gate — builds HEAD, not your working
```

`scripts/gate.sh` refuses a dirty tree, then builds and tests the committed HEAD
in an isolated clone across four arches. Run it before pushing — a green
working-tree `go test` can hide a partial commit that doesn't compile.
in an isolated clone across every released target (linux, darwin and windows ×
amd64, arm64). Run it before pushing — a green working-tree `go test` can hide a
partial commit that doesn't compile.

Integration tests run against a real database when `PGBOT_TEST_DSN` (a superuser
DSN unlocks the doc-verify guard via `PGBOT_TEST_SUPERUSER_DSN`) is set:
Expand Down
5 changes: 3 additions & 2 deletions scripts/gate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ command -v golangci-lint >/dev/null || {
}
golangci-lint run ./...
CGO_ENABLED=0 go test ./...
for goos in linux darwin; do
# Every target .goreleaser.yaml ships, windows included.
for goos in linux darwin windows; do
for goarch in amd64 arm64; do
CGO_ENABLED=0 GOOS="$goos" GOARCH="$goarch" go build -o /dev/null ./cmd/pgbot
done
done
popd >/dev/null
echo "✓ HEAD builds, vets, and tests clean (4 arches)"
echo "✓ HEAD builds, vets, and tests clean (6 targets)"

# (3) "Green" must mean CI, not just local — surface the latest main conclusion.
if command -v gh >/dev/null 2>&1; then
Expand Down