# The Go control plane is ~24k lines, and until this workflow existed the only # Go tests CI ever ran were the two load tests in multiplayer-load.yml. Nothing # else — domain policy, the wire/store boundaries, the allocator, the Steam # adapter — gated a change. The Godot unit suite is covered (verify-phase6 runs # test_runner.tscn as its first step); this closes the equivalent gap on the # Go side. # # Deliberately Docker-free and cluster-free so it stays fast enough to gate # every push. Tests that need a real PostgreSQL or Redis are behind the # `integration` build tag and stay with their own scripts; `go vet` is still # run over that tag so those files cannot rot uncompiled. name: Server Unit Tests on: push: pull_request: permissions: contents: read jobs: go-tests: runs-on: ubuntu-latest defaults: run: working-directory: server steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version-file: server/go.mod cache-dependency-path: server/go.sum - name: Build run: go build ./... - name: Vet run: go vet ./... # Integration-tagged files are excluded from the default build, so # without this a signature change could leave them broken until someone # ran the integration scripts by hand. - name: Vet integration-tagged tests run: go vet -tags integration ./... - name: Test run: go test ./... # The control plane is concurrent by design: outbox dispatchers, the # event hub, the matcher worker and the allocator all run in parallel. - name: Test with race detector run: go test -race ./...