aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorFelix Hanley <felix@userspace.com.au>2019-03-13 23:50:44 +0000
committerFelix Hanley <felix@userspace.com.au>2019-03-13 23:50:44 +0000
commite4dec467e33502787dcb94441b9c650d94e0bf89 (patch)
tree9805212dd435bfe693fd0e9573269a7eac436726 /Makefile
parent4ee862745d049771b37951bc9d833e9497a69385 (diff)
downloadmigrate-e4dec467e33502787dcb94441b9c650d94e0bf89.tar.gz
migrate-e4dec467e33502787dcb94441b9c650d94e0bf89.tar.bz2
Try drone.io
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 8 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index af62b64..3a532f8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,21 +1,23 @@
-test: ## Run tests and create coverage report
- go test -short -coverprofile=coverage.out ./...
- go tool cover -html=coverage.out -o coverage.html
+.PHONY: test
+test: lint sqlite ## Run tests and create coverage report
+ go test -race -short -coverprofile=coverage.txt -covermode=atomic ./...
+ go tool cover -html=coverage.txt -o coverage.html
sqlite:
go get -u $(FLAGS) github.com/mattn/go-sqlite3
go install $(FLAGS) github.com/mattn/go-sqlite3
+.PHONY: lint
lint:
@for file in $$(find . -name 'vendor' -prune -o -type f -name '*.go'); do \
golint $$file; done
+.PHONY: clean
clean: ## Clean up temp files and binaries
- rm -rf coverage* vendor Gopkg*
+ rm -rf coverage*
+.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) |sort \
|awk 'BEGIN{FS=":.*?## "};{printf "\033[36m%-30s\033[0m %s\n",$$1,$$2}'
-
-.PHONY: help test lint clean