diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..e4de0cde6 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,22 @@ +language: go + +go: + - 1.12.x + +install: make + +env: + - GO111MODULE=on + +before_install: + - GO111MODULE=off go get -v golang.org/x/lint/golint + - GO111MODULE=off go get -u github.com/kisielk/errcheck + +script: + - make check_all + - git diff --exit-code + - make test_full + - make victoria-metrics + +after_success: + - bash <(curl -s https://codecov.io/bash) \ No newline at end of file diff --git a/Makefile b/Makefile index a1d3875ee..9bb6cba40 100644 --- a/Makefile +++ b/Makefile @@ -50,10 +50,15 @@ errcheck: install-errcheck install-errcheck: which errcheck || GO111MODULE=off go get -u github.com/kisielk/errcheck +check_all: fmt vet lint errcheck + test: GO111MODULE=on go test -mod=vendor ./lib/... GO111MODULE=on go test -mod=vendor ./app/... +test_full: + GO111MODULE=on go test -mod=vendor -coverprofile=coverage.txt -covermode=atomic ./lib/... ./app/... + benchmark: GO111MODULE=on go test -mod=vendor -bench=. ./lib/... GO111MODULE=on go test -mod=vendor -bench=. ./app/... diff --git a/README.md b/README.md index fc51cebf8..1540bbf60 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ [![Latest Release](https://img.shields.io/github/release/VictoriaMetrics/VictoriaMetrics.svg?style=flat-square)](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/latest) [![Go Report](https://goreportcard.com/badge/github.com/VictoriaMetrics/VictoriaMetrics)](https://goreportcard.com/report/github.com/VictoriaMetrics/VictoriaMetrics) +[![Build Status](https://travis-ci.org/VictoriaMetrics/VictoriaMetrics.svg?branch=master)](https://travis-ci.org/VictoriaMetrics/VictoriaMetrics) +[![codecov](https://codecov.io/gh/VictoriaMetrics/VictoriaMetrics/branch/master/graph/badge.svg)](https://codecov.io/gh/VictoriaMetrics/VictoriaMetrics) + Victoria Metrics