From 843af24e75a5a4e16938aee18cebc2bb5a02c71c Mon Sep 17 00:00:00 2001 From: Abdulsametileri Date: Mon, 18 Apr 2022 11:24:03 +0300 Subject: [PATCH] Add: Copy Makefile to testdata/ because in case of update md5 hash changing and e2e-test and units test errors --- testdata/Makefile | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 testdata/Makefile diff --git a/testdata/Makefile b/testdata/Makefile new file mode 100644 index 0000000..c31f1a4 --- /dev/null +++ b/testdata/Makefile @@ -0,0 +1,39 @@ +## help: print this help message +help: + @echo "Usage:" + @sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ":" | sed -e 's/^/ /' + +## lint: runs golangci lint based on .golangci.yml configuration +.PHONY: lint +lint: + golangci-lint run -c .golangci.yml --fix -v + +## unit-test: runs tests +.PHONY: unit-test +unit-test: + go test -v ./... -coverprofile=unit_coverage.out + +## unit-coverage-html: extract unit tests coverage to html format +.PHONY: unit-coverage-html +unit-coverage-html: + make unit-test + go tool cover -html=unit_coverage.out -o unit_coverage.html + +## before-commit: run golangci lint and unit tests before commit +.PHONY: before-commit +before-commit: lint unit-test + +## build-cli: build the cli application +.PHONY: build-cli +build-cli: + go build -o vx cli/main.go + +## precommit-install: install pre-commit scripts to .git/hooks +.PHONY: precommit-install +precommit-install: + pre-commit install + +## precommit-run: runs pre-commit scripts without commiting the changes +.PHONY: precommit-run +precommit-run: + pre-commit run --all-files \ No newline at end of file