Add tests, CI workflow, and golangci-lint config#1
Merged
Conversation
Covers the xpoint client (auth header, query builders, HTTP calls via httptest), the cmd helpers (output format, jq filter, auth resolution, --body loader). GitHub Actions runs go test -race and golangci-lint on push and PR. Also realign a struct so gofmt is satisfied. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Run golangci-lint first, then go build and go test -race in the same job so shared setup-go + cache is reused. Switch to golangci-lint-action@v7 and pin v2.11.3 because v6 installs a v1 binary built with Go 1.24, which cannot load a config targeting Go 1.26.1. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add .pinact.yaml and run pinact -u to pin actions/checkout, actions/setup-go, and golangci/golangci-lint-action to commit SHAs (major versions bumped in the process: checkout v6.0.2, setup-go v6.4.0, golangci-lint-action v9.2.0). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add .github/dependabot.yml covering gomod and github-actions ecosystems on a weekly schedule, plus a workflow that enables auto-merge on Dependabot PRs whose update-type is semver-patch or semver-minor (major updates still require manual review). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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
internal/xpointとcmdパッケージにユニットテストを追加 (httptest でのクライアント検証、認証解決、--jq/ output format、--body読み込み).github/workflows/ci.yml) を追加し、push / PR でgo build+go test -raceと golangci-lint を実行.golangci.yml(golangci-lint v2) を追加し、CLI 出力系のfmt.Fprint*/Flush/Closeを errcheck の除外にするなど実用的な設定を投入Test plan
testジョブが greenlintジョブが greengo test -race ./...とgolangci-lint run ./...が通ることを確認済み🤖 Generated with Claude Code