mirror of
https://github.com/MedUnes/go-kata.git
synced 2026-03-12 21:55:53 +07:00
17 lines
478 B
Makefile
17 lines
478 B
Makefile
test:
|
|
go run gotest.tools/gotestsum@latest --format=testdox -- -covermode=atomic -coverprofile=coverage.txt ./...
|
|
benchmark:
|
|
go test -bench=. -benchmem ./...
|
|
format:
|
|
go fmt ./...
|
|
format-check:
|
|
@UNFORMATTED_FILES=$$(gofmt -l .); \
|
|
if [ -n "$$UNFORMATTED_FILES" ]; then \
|
|
echo "::error::The following files are not formatted correctly:"; \
|
|
echo "$$UNFORMATTED_FILES"; \
|
|
echo "--- Diff ---"; \
|
|
gofmt -d .; \
|
|
exit 1; \
|
|
fi
|
|
|
|
.PHONY: test format benchmark format-check |