diff options
| -rw-r--r-- | .drone.yml | 11 | ||||
| -rw-r--r-- | .travis.yml | 10 | ||||
| -rw-r--r-- | Makefile | 14 | ||||
| -rw-r--r-- | README.md | 2 |
4 files changed, 20 insertions, 17 deletions
diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..0e5ed0f --- /dev/null +++ b/.drone.yml @@ -0,0 +1,11 @@ +kind: pipeline +name: default +steps: + - name: test + image: "golang:alpine" + commands: + - go get -u $(FLAGS) github.com/mattn/go-sqlite3 + - go install $(FLAGS) github.com/mattn/go-sqlite3 + - for file in $$(find . -name 'vendor' -prune -o -type f -name '*.go'); do golint $$file; done + - go test -race -short -coverprofile=coverage.txt -covermode=atomic ./... + - bash <(curl -s https://codecov.io/bash) diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d810107..0000000 --- a/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: go -go: - - "1.x" - - master -before_install: - - make sqlite -script: - - go test -race -coverprofile=coverage.txt -covermode=atomic -after_success: - - bash <(curl -s https://codecov.io/bash) @@ -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 @@ -1,6 +1,6 @@ # Go migrations -[](https://travis-ci.org/felix/go-migrate) +[](https://cloud.drone.io/felix/go-migrate) [](http://godoc.org/github.com/felix/go-migrate) [](https://goreportcard.com/report/github.com/felix/go-migrate) |
