From 5b22f64607e22baba0e15938272ba7a6a594e5d3 Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Thu, 10 Mar 2016 11:57:33 -0800 Subject: [PATCH] Add .travis.yml config and badge. - Ensure gofmted code. - Run go vet. - Run tests with race detector. - Run on 1.6 and tip, but tip is an allowed failure with fast finish on. --- .travis.yml | 16 ++++++++++++++++ README.md | 2 ++ 2 files changed, 18 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..ab1e812 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,16 @@ +sudo: false +language: go +go: + - 1.6 + - tip +matrix: + allow_failures: + - go: tip + fast_finish: true +install: + - # Do nothing. This is needed to prevent default install action "go get -t -v ./..." from happening here (we want it to happen inside script step). +script: + - go get -t -v ./... + - diff -u <(echo -n) <(gofmt -d -s .) + - go tool vet . + - go test -v -race ./... diff --git a/README.md b/README.md index 3eac8a0..b4bb824 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ httpcache ========= +[![Build Status](https://travis-ci.org/gregjones/httpcache.svg?branch=master)](https://travis-ci.org/gregjones/httpcache) + A Transport for Go's http.Client that will cache responses according to the HTTP RFC Package httpcache provides a http.RoundTripper implementation that works as a mostly RFC-compliant cache for http responses.