aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.drone.yml11
-rw-r--r--.travis.yml10
-rw-r--r--Makefile14
-rw-r--r--README.md2
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)
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
diff --git a/README.md b/README.md
index 3a4d24c..0122c37 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Go migrations
-[![Build Status](https://travis-ci.org/felix/go-migrate.svg)](https://travis-ci.org/felix/go-migrate)
+[![Build Status](https://cloud.drone.io/api/badges/felix/go-migrate/status.svg)](https://cloud.drone.io/felix/go-migrate)
[![GoDoc](https://godoc.org/github.com/felix/go-migrate?status.svg)](http://godoc.org/github.com/felix/go-migrate)
[![Go Report Card](https://goreportcard.com/badge/github.com/felix/go-migrate)](https://goreportcard.com/report/github.com/felix/go-migrate)