Add ci pipeline - #4
Merged
Merged
Conversation
No behavior change — whitespace/alignment only. These had drifted out of gofmt formatting over time with no CI to catch it; fixing now so the incoming formatting check starts green. Claude-Session: https://claude.ai/code/session_013JDYDmFTMkiCh2YgpG4hvx
config.Load() has required PINT_SESSION_SECRET (unless PINT_DISABLE_OIDC=true) since it was added, but the fullEnv() test fixture was never updated to set it. TestLoad_AllVarsPresent and TestLoad_SkipTLSVerifyTrue were failing as a result — caught while wiring up CI, which didn't exist yet to catch it sooner. Claude-Session: https://claude.ai/code/session_013JDYDmFTMkiCh2YgpG4hvx
Fixes findings from golangci-lint's default linter set (errcheck, staticcheck), run for the first time while wiring up CI: - Check/handle previously-ignored errors from Close, SetDeadline, Fprint, Encode, and Decode calls (log-and-continue where the call site is already best-effort, propagate where it isn't). - Drop the redundant embedded field name in two SCEP selector expressions (msg.CSRReqMessage.X -> msg.X), flagged by staticcheck QF1008. No behavior change outside of the newly-checked error paths. Claude-Session: https://claude.ai/code/session_013JDYDmFTMkiCh2YgpG4hvx
Adds .github/workflows/go-ci.yml, gated on push to main/dev and on PRs
touching Go sources, with three jobs:
- test: go vet + go test ./... -race
- fmt: gofmt -l fails the job and lists offending files
- lint: golangci-lint (pinned v2.13.1) against .golangci.yml, which
explicitly enables errcheck, govet, ineffassign, staticcheck,
unused, and bodyclose rather than trusting the tool's shifting
"default" bundle
Also updates the Makefile so `make fmt`/`make fmt-check`/`make lint`
run the same checks locally as CI does.
Claude-Session: https://claude.ai/code/session_013JDYDmFTMkiCh2YgpG4hvx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
what the PR changes
Why
why these changes were made
Test Plan
how did you verify these changes did what you expected
Env Vars
did you add, remove, or rename any environment variables
Documentation
did you add or update any documentation. PRs should, at the minimum, update documentation when they make existing documentation out of date.
Checklist