This repository was archived by the owner on Mar 20, 2026. It is now read-only.
Go 1.24 ツール依存機能を使用して gotestsum を統合する - #17
Merged
Merged
Conversation
This commit introduces `gotestsum` to the project for enhanced test execution and reporting, utilizing the Go 1.24 feature for managing tool dependencies directly in `go.mod`. Key changes: - Added `gotest.tools/gotestsum` as a tool dependency to `go.mod` using `go get -d` and `go mod edit -tool`. - Updated Makefile: - The `test` target now uses `gotestsum` with `short-verbose` format. - Added `test-rerun-fails` target using `gotestsum --rerun-fails`. - Added `test-ci` target using `gotestsum --junitfile report.xml --format dots`. - Makefile test targets use `go run gotest.tools/gotestsum` for execution. - `clean` target updated to remove `report.xml` and `.gotestsum.json`. - Updated GitHub Actions workflow (`.github/workflows/go.yml`): - Added step to `go install gotest.tools/gotestsum@v1.12.3`. - Test execution changed to `make test-ci`. - Added step to upload `report.xml` artifact. This approach replaces the previous `tools.go` method for managing `gotestsum` and aligns with the newer Go tooling standards.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
このコミットでは、Go 1.24 のツール依存関係を
go.modで直接管理する機能を利用して、テスト実行とレポート機能を強化するためにプロジェクトにgotestsumを導入します。主な変更点:
go get -dおよびgo mod edit -toolを使用して、go.modへのツール依存関係としてgotest.tools/gotestsumを追加しました。testターゲットでshort-verbose形式のgotestsumを使用するようになりました。gotestsum --rerun-failsを使用してtest-rerun-failsターゲットを追加しました。gotestsum --junitfile report.xml --format dotsを使用してtest-ciターゲットを追加しました。go run gotest.tools/gotestsumを使用するようになりました。cleanターゲットを更新し、report.xmlと.gotestsum.jsonを削除しました。.github/workflows/go.yml) を更新しました。go install gotest.tools/gotestsum@v1.12.3のステップを追加しました。make test-ciに変更しました。report.xmlアーティファクトをアップロードするステップを追加しました。このアプローチは、
gotestsumを管理するための以前のtools.goメソッドに代わるものであり、新しい Go ツール標準に準拠しています。