Skip to content

Add tests, CI workflow, and golangci-lint config#1

Merged
buty4649 merged 4 commits intomainfrom
add-tests-ci
Apr 17, 2026
Merged

Add tests, CI workflow, and golangci-lint config#1
buty4649 merged 4 commits intomainfrom
add-tests-ci

Conversation

@buty4649
Copy link
Copy Markdown
Contributor

Summary

  • internal/xpointcmd パッケージにユニットテストを追加 (httptest でのクライアント検証、認証解決、--jq / output format、--body 読み込み)
  • GitHub Actions ワークフロー (.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

  • CI の test ジョブが green
  • CI の lint ジョブが green
  • ローカルで go test -race ./...golangci-lint run ./... が通ることを確認済み

🤖 Generated with Claude Code

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>
@buty4649 buty4649 self-assigned this Apr 17, 2026
buty4649 and others added 3 commits April 17, 2026 12:24
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>
@buty4649 buty4649 merged commit f91c8ff into main Apr 17, 2026
3 checks passed
@buty4649 buty4649 deleted the add-tests-ci branch April 17, 2026 03:33
This was referenced Apr 17, 2026
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