Repository navigation
ci: run go vet + test on PRs + master pushes - #78
Merged
Merged
Conversation
Adds a test workflow separate from release.yml so PR authors get fast
feedback before merge without waiting for semantic-release / docker.
Runs go vet + go test -race -count=1 against the full ./... tree.
Paired with this, master's branch protection should require the
"test / go test + vet" check to pass before merging. That's applied via
the GH API after this workflow has run at least once (so the check
name is known to GitHub's protection layer):
gh api -X PUT repos/:owner/:repo/branches/master/protection -f \
required_status_checks='{"strict":true,"contexts":["test / go test + vet"]}' \
-f enforce_admins=false -f required_pull_request_reviews=null \
-f restrictions=null
Left unapplied here so the first CI run can't accidentally block an
in-flight merge if anything's misconfigured.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Leftover from an earlier refactor. 'go vet' rejects "result of Sprintf not used", which breaks the new test workflow. The silence-import comment is stale — fmt had no other use in the file.
Documented inline. Re-add once telemetry.DriverHealth writes from OCPP handlers are serialized.
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.
Summary
Adds a dedicated test workflow so PR authors get fast feedback before merge. Runs
go vet ./...andgo test -race -count=1 ./...on every PR targeting master and on master pushes.Requested by @Xorath — tests should run on PRs and merges should be blocked until they pass.
Why separate from release.yml
Release runs semantic-release + Docker build + binary artifacts — useful on master but too slow for PR feedback. Splitting keeps PR turnaround tight.
Follow-up (not in this PR)
Once this workflow has run successfully at least once, apply branch protection to master so the check becomes required:
Deliberately left out of this PR so a misconfiguration can't accidentally block an in-flight merge.
Known gotcha
go test ./...currently fails on PR #72's branch due to the Lua warmup regression in80e5ae4(see #72 (comment)). Once this workflow is live and branch protection is on, PR #72 will need that fix before it can merge — which is working as intended.Test plan
uv run --with pyyaml python -c ...).🤖 Generated with Claude Code