-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Enabling shuffling, cleanup and consistency across tests (#2931)
* Make Test/Benchmark names consistent. Add Makefile for GoFiber developers * Cleanup README and Makefile * Update statement
- Loading branch information
Showing
17 changed files
with
187 additions
and
114 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ jobs: | |
run: go install gotest.tools/[email protected] | ||
|
||
- name: Test | ||
run: gotestsum -f testname -- ./... -race -count=1 -coverprofile=coverage.txt -covermode=atomic | ||
run: gotestsum -f testname -- ./... -race -count=1 -coverprofile=coverage.txt -covermode=atomic -shuffle=on | ||
|
||
- name: Upload coverage reports to Codecov | ||
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.go-version == '1.22.x' }} | ||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
## help: 💡 Display available commands | ||
.PHONY: help | ||
help: | ||
@echo '⚡️ GoFiber/Fiber Development:' | ||
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /' | ||
|
||
## audit: 🚀 Conduct quality checks | ||
.PHONY: audit | ||
audit: | ||
go mod verify | ||
go vet ./... | ||
go run golang.org/x/vuln/cmd/govulncheck@latest ./... | ||
|
||
## benchmark: 📈 Benchmark code performance | ||
.PHONY: benchmark | ||
benchmark: | ||
go test ./... -benchmem -bench=. -run=^Benchmark_$ | ||
|
||
## coverage: ☂️ Generate coverage report | ||
.PHONY: coverage | ||
coverage: | ||
go run gotest.tools/gotestsum@latest -f testname -- ./... -race -count=1 -coverprofile=/tmp/coverage.out -covermode=atomic | ||
go tool cover -html=/tmp/coverage.out | ||
|
||
## format: 🎨 Fix code format issues | ||
.PHONY: format | ||
format: | ||
go run mvdan.cc/gofumpt@latest -w -l . | ||
|
||
## lint: 🚨 Run lint checks | ||
.PHONY: lint | ||
lint: | ||
go run github.com/golangci/golangci-lint/cmd/[email protected] run ./... | ||
|
||
## test: 🚦 Execute all tests | ||
.PHONY: test | ||
test: | ||
go run gotest.tools/gotestsum@latest -f testname -- ./... -race -count=1 -shuffle=on | ||
|
||
## tidy: 📌 Clean and tidy dependencies | ||
.PHONY: tidy | ||
tidy: | ||
go mod tidy -v |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
95c1814
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
2
.Benchmark_Etag
201.3
ns/op 0 B/op 0 allocs/op97.85
ns/op 0 B/op 0 allocs/op2.06
Benchmark_Middleware_Favicon
209.3
ns/op 12 B/op 4 allocs/op88.92
ns/op 3 B/op 1 allocs/op2.35
This comment was automatically generated by workflow using github-action-benchmark.