diff options
author | Niall Sheridan <nsheridan@gmail.com> | 2018-08-25 13:49:59 +0100 |
---|---|---|
committer | Niall Sheridan <nsheridan@gmail.com> | 2018-08-25 19:07:38 +0100 |
commit | c82e7ee1d46a67f686f1d00aa35e7594b31022d5 (patch) | |
tree | 82a1d7fb47158b1a11c4c566a119f39e136ad071 | |
parent | 911a0025b3b84858505e1d2b7c264250ae57d205 (diff) |
Add codecov.io
Split runs into lint/test
Remove go 1.9 - coverage does not work with `./...` and go 1.9
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | .travis.yml | 9 | ||||
-rw-r--r-- | Makefile | 7 | ||||
-rw-r--r-- | README.md | 4 |
4 files changed, 13 insertions, 8 deletions
@@ -9,3 +9,4 @@ signing_key* http.log .idea .DS_Store +coverage.txt diff --git a/.travis.yml b/.travis.yml index 5b4aaa3..50ddc92 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,12 +3,12 @@ services: - mysql env: - - MYSQL_TEST="true" + - SUITE=lint + - SUITE=test go: - 1.11.x - 1.10.x - - 1.9.x - tip matrix: @@ -25,4 +25,7 @@ install: sudo: false script: - - make test + - MYSQL_TEST="true" make $SUITE + +after_success: + - bash <(curl -s https://codecov.io/bash) @@ -10,9 +10,11 @@ CGO_ENABLED ?= $(shell go env CGO_ENABLED) all: test build -test: dep - go test ./... +test: + go test -coverprofile=coverage.txt -covermode=count ./... go install -race $(CASHIER_CMD) $(CASHIERD_CMD) + +lint: dep go vet ./... go list ./... |xargs -L1 golint -set_exit_status gofmt -s -d -l -e $(SRC_FILES) @@ -39,7 +41,6 @@ migration: dep: go get -u golang.org/x/lint/golint - go get -u golang.org/x/tools/cmd/goimports version: @echo $(VERSION) @@ -76,10 +76,10 @@ docker run -it --rm -p 10000:10000 --name cashier -v ${PWD}:/cashier nsheridan/c # Requirements ## Server -Go 1.9 or 1.10, though it may work with earlier versions. +Go 1.10 or 1.11, though it may work with earlier versions. ## Client -- Go 1.9 or 1.10 or later, though it may work with earlier versions. +- Go 1.10 or 1.11 or later, though it may work with earlier versions. - OpenSSH 5.6 or newer. - A working SSH agent (note that the GPG agent does not handle certificates) |