mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
21c8a33647
* Commit of new etcd snapshot integration tests. * Updated integration github action to not run on doc changes. * Update Drone runner to only run unit tests Signed-off-by: dereknola <derek.nola@suse.com>
34 lines
1.1 KiB
Makefile
34 lines
1.1 KiB
Makefile
###### Help ###################################################################
|
|
|
|
.DEFAULT_GOAL = help
|
|
|
|
.PHONY: help
|
|
|
|
help: ## list Makefile targets
|
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
|
|
|
###### Targets ################################################################
|
|
|
|
test: version download fmt vet ginkgo ## Runs all build, static analysis, and test steps
|
|
|
|
download: ## Download dependencies
|
|
go mod download
|
|
|
|
vet: ## Run static code analysis
|
|
go vet ./...
|
|
|
|
ginkgo: ## Run tests using Ginkgo
|
|
go run github.com/onsi/ginkgo/ginkgo -p -r --randomizeAllSpecs --failOnPending --randomizeSuites --race
|
|
|
|
fmt: ## Checks that the code is formatted correcty
|
|
@@if [ -n "$$(gofmt -s -e -l -d .)" ]; then \
|
|
echo "gofmt check failed: run 'gofmt -s -e -l -w .'"; \
|
|
exit 1; \
|
|
fi
|
|
|
|
docker_test: ## Run tests in a container via docker-compose
|
|
docker-compose build test && docker-compose run --rm test make test
|
|
|
|
version: ## Display the version of Go
|
|
@@go version
|