From 94313e7b395fd564757f670ae83659f4151cb8a3 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Fri, 8 Jun 2018 17:19:37 +0200 Subject: [PATCH] add travis config --- .travis.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..a5793e2 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,18 @@ +# Use the (faster) container-based infrastructure, see also +# http://docs.travis-ci.com/user/workers/container-based-infrastructure/ +sudo: false +dist: trusty +services: + - docker + +language: go +go: + - "1.10" + +script: + # Check whether files are syntactically correct. + - "gofmt -l $(find . -name '*.go' | tr '\\n' ' ') >/dev/null" + # Check whether files were not gofmt'ed. + - "gosrc=$(find . -name '*.go' | tr '\\n' ' '); [ $(gofmt -l $gosrc 2>&- | wc -l) -eq 0 ] || (echo 'gofmt was not run on these files:'; gofmt -l $gosrc 2>&-; false)" + - go tool vet . + - go test ./...