ci: add a PR gate that actually checks the generated code (#548)
This repo has had no GitHub Actions at all -- only a .travis.yml, and Travis
stopped serving open-source repos long ago. So PRs here run zero build and zero
tests, which means `mergeable_state: clean` on a codegen PR currently means
"nobody is checking", not "it passed".
What this adds
--------------
`.github/workflows/ci.yml` with three checks and a single `ci-gate` aggregator,
so branch protection only ever needs one required check name regardless of how
the jobs are rearranged later.
The gate keeps only what decides whether the generated SDK is usable:
ci-syntax `go build ./...` + gofmtcheck -- covers services/ (the generated
packages). Also catches duplicate imports and duplicate
declarations, which Go treats as compile errors.
lint `go vet ./...` -- real bug patterns (printf arg mismatch, lock
copying, unused assignments), not style.
test `make test-cov`.
Coverage upload is a continue-on-error step inside `test` and is deliberately
not part of `ci-gate`: an upload credential problem must never turn a PR red.
Also fixes a test that could not pass reliably
----------------------------------------------
`TestClientTimeout` pointed the client at https://httpbin.org/delay/2, a
third-party public service. When that service is unavailable the assertions
fail -- measured: it returned 503 and the test failed. There is no
testing.Short() guard either, so `-short` cannot skip it. `Test_errorHandler`
had a second reference to the same host.
Both now use a local httptest server. The handler also selects on
r.Context().Done() so it returns as soon as the client times out and
srv.Close() does not block.
Removes .travis.yml, which describes a CI that has not run in years.
Verified locally
----------------
make ci-syntax exit 0 (and exit 2 on an injected syntax error,
and exit 2 on injected gofmt drift)
make lint exit 0
make test-cov exit 0 (was failing on TestClientTimeout before this)
Not included: a scheduled compatibility matrix. The declared floor in go.mod is
go 1.13 and I have not verified the current tree builds on it, so shipping that
matrix now would just produce a red nightly. Worth doing as a follow-up. E
Episkey committed
b7cb35fb33286efe59ae02cab5fbd674aa8f1ed0
Parent: 25aeda4
Committed by GitHub <noreply@github.com>
on 8/18/2026, 10:43:32 AM