Skip to content

Commit

Permalink
checkpoint for adding travisCI and coveralls support
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-hanna committed May 2, 2017
1 parent b76bf67 commit a735b40
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.DS_Store

coverage.out
coverage-all.out
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
language: go
go:
- 1.7.x
branches:
only:
- feature/travisCI
env:
global:
secure: hEiVIu1nvTloePPm72L6867b8h11/dxydcbpqoujUE89n5MiFh0zo/Du05N0eYjlmjANq3uvVGgHnWNSX4l8yqZf1QcOE2yvs9e06vqMZbK6iryT2Mm8KuLFgpHulQinz/SSJo6Kw4o8UXhJT9r80YqpgOT6EZX/2YRetz/kYQqI+qe6GqYSDZVATYgG54E0puLR0hBNwWuGfjWCmiGXFuIJl8mEqnx9rd4B8VPARMWToVvTo/IC3O1zpNPMV9zDcC3CG+/quQJHFELpCB1c7SHEYClKeZrVnrqcoGgs+3z3P0wPfXo+fTragRhtLf5Ynbru+Af1p3vzfcOjmVys+k6+b1cqS8GJ73k/+Y2L7QrrHrOZRJbA9ATYobXSfPFbCCw+iRRHnwZDHnZlMt8mQkn+LA0SH+YRNiyLRhgqPOKr00UwzMoi4ckDd6PjhT5SuWaoiADDFuxZ5Ld+VbWoNoLHeVtt+Kn+nR9PhOJ0taWnOKo6VOVg2oainR5vERuuP/JOG+sH1lN8LTjxHERb9Zx0zZowDczvLi0mD7ehoOwBp3fpuJ5FOSZyI8+jB0dZTzaOTBQWve71SQzGt7z9eXAzA8RNTkBt/MTCf9k0qqVD6n237nkMZMaluOeQ8ez6O8v1H2nZ9R/BrWcLhFwjLg+8294MCNYjcKmzhg6S5cY=
install:
- go get golang.org/x/tools/cmd/cover
- go get github.com/mattn/goveralls
- go get github.com/garyburd/redigo/redis
- go get github.com/pborman/uuid
script:
- make test-cover-html
- $(go env GOPATH | awk 'BEGIN{FS=":"} {print $1}')/bin/goveralls -coverprofile=coverage-all.out
-service=travis-ci -repotoken=$COVERALLS_TOKEN
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.PHONY: test-cover-html
PACKAGES = $(shell find ./ -type d -not -path '*/\.*' | grep -v vendor)

fmt:
bash -c 'go list ./... | grep -v vendor | xargs -n1 go fmt'

test:
bash -c 'go list ./... | grep -v vendor | xargs -n1 go test -timeout=30s -tags="unit integration e2e"'

# thanks!
# https://gist.github.com/skarllot/13ebe8220822bc19494c8b076aabe9fc
test-cover-html:
echo "mode: count" > coverage-all.out
$(foreach pkg,$(PACKAGES),\
go test -tags="unit integration e2e" -coverprofile=coverage.out -covermode=count $(pkg);\
tail -n +2 coverage.out >> coverage-all.out;)
go tool cover -html=coverage-all.out
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Build Status](https://travis-ci.org/adam-hanna/go-sessions.svg?branch=feature%2FtravisCI)](https://travis-ci.org/adam-hanna/go-sessions?branch=feature%2FtravisCI) [![Coverage Status](https://coveralls.io/repos/github/adam-hanna/go-sessions/badge.svg?branch=feature%2FtravisCI)](https://coveralls.io/github/adam-hanna/go-sessions?branch=feature%2FtravisCI) [![Go Report Card](https://goreportcard.com/badge/github.com/adam-hanna/go-sessions)](https://goreportcard.com/report/github.com/adam-hanna/go-sessions) [![GoDoc](https://godoc.org/github.com/adam-hanna/go-sessions?status.svg)](https://godoc.org/github.com/adam-hanna/go-sessions)

# Go Sessions
A dead simple, highly customizable sessions service for go http servers

Expand Down

0 comments on commit a735b40

Please sign in to comment.