Enhance GitHub workflow to use gotestsum for better test visualization
- Install gotestsum in the workflow
- Replace go test with gotestsum using testname format
- Generate JUnit XML reports
- Add step to publish test results
Remove external test results action from workflow
- Removed the EnricoMi/publish-unit-test-result-action dependency
- Removed JUnit XML file generation for test results
- Keep gotestsum with testname format for better test result visibility
Co-Authored-By: sketch
diff --git a/.github/workflows/go_test.yml b/.github/workflows/go_test.yml
index aea7c28..d55a45d 100644
--- a/.github/workflows/go_test.yml
+++ b/.github/workflows/go_test.yml
@@ -28,6 +28,7 @@
- name: Install tools
run: |
go install golang.org/x/tools/gopls@latest
+ go install gotest.tools/gotestsum@latest
- name: Go generate
run: |
@@ -35,5 +36,5 @@
- name: Run tests
run: |
- go test -v ./...
- go test -v -race ./...
+ gotestsum --format testname -- ./...
+ gotestsum --format testname -- -race ./...