Skip to content

ci(ci.yaml): add go-test job running go test -race ./...#166

Merged
YimingIsCOLD merged 1 commit into
mainfrom
ci/add-go-test-job
May 11, 2026
Merged

ci(ci.yaml): add go-test job running go test -race ./...#166
YimingIsCOLD merged 1 commit into
mainfrom
ci/add-go-test-job

Conversation

@YimingIsCOLD
Copy link
Copy Markdown
Contributor

🚀 Summary

CI currently verifies formatting, JS lint, and Go static analysis but does not execute Go tests, so a failing test only surfaces locally or after merge. This adds a go-test job that runs the suite with the race detector on every PR, catching concurrency bugs in the net/http handlers and middleware that static analysis cannot.

✏️ Changes

  • Add go-test job to .github/workflows/ci.yaml, placed after go-lint.
  • Job runs go test -race ./... on ubuntu-latest, using actions/setup-go@v6 with go-version-file: 'go.mod' (matches the go-lint job's preamble).
  • Standalone parallel job with no needs:, matching the existing one-tool-per-job pattern.
  • Relies on setup-go@v6's default module + build cache (keyed on go.sum); no explicit cache step.
  • No coverage reporting, no OS/Go matrix, no custom timeout (deferred until a concrete need arises).

🧪 Test Plan

  • go test -race ./... passes locally on all six test packages (handler, htmlutil, middleware, dotenv, random).
  • The new Go Test check appears and passes on this PR.

@YimingIsCOLD YimingIsCOLD self-assigned this May 11, 2026
@YimingIsCOLD YimingIsCOLD merged commit 775f935 into main May 11, 2026
8 checks passed
@YimingIsCOLD YimingIsCOLD deleted the ci/add-go-test-job branch May 11, 2026 10:11
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