diff --git a/.test-coverage b/.test-coverage index 56cbe13..cd46eda 100755 --- a/.test-coverage +++ b/.test-coverage @@ -2,18 +2,20 @@ # Issue: https://github.com/mattn/goveralls/issues/20 # Source: https://github.com/uber/go-torch/blob/63da5d33a225c195fea84610e2456d5f722f3963/.test-cover.sh CI=$1 -TOKEN=$2 echo "run for $CI" -echo "with $(go version)" + +if [ "$CI" == "circle-ci" ]; then + cd ${GOPATH}/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME} +fi echo "mode: count" > profile.cov FAIL=0 # Standard go tooling behavior is to ignore dirs with leading underscors -for dir in $(find . -maxdepth 10 -not -path './.git*' -not -path '*/_*' -type d); +for dir in $(find . -maxdepth 10 -not -path './vendor/*' -not -path './.git*' -not -path '*/_*' -type d); do if ls $dir/*.go &> /dev/null; then - go test -p 1 -v -covermode=count -coverprofile=profile.tmp $dir || FAIL=$? + go test -v -covermode=count -coverprofile=profile.tmp $dir || FAIL=$? if [ -f profile.tmp ] then tail -n +2 < profile.tmp >> profile.cov @@ -24,7 +26,7 @@ done # Failures have incomplete results, so don't send if [ "$FAIL" -eq 0 ]; then - goveralls -v -coverprofile=profile.cov -service=$CI -repotoken=$TOKEN + goveralls -v -coverprofile=profile.cov -service=$CI -repotoken=$COVERALLS_REPO_TOKEN fi exit $FAIL diff --git a/LICENSE.md b/LICENSE.md index 77f0656..05d9023 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017 Geno +Copyright (c) 2017 genofire Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index ca9630b..0534a1c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# golang-lib [![Build Status](https://travis-ci.org/genofire/golang-lib.svg?branch=master)](https://travis-ci.org/genofire/golang-lib) [![CircleCI](https://circleci.com/gh/genofire/golang-lib/tree/master.svg?style=shield)](https://circleci.com/gh/genofire/golang-lib/tree/master) [![Coverage Status](https://coveralls.io/repos/github/genofire/golang-lib/badge.svg?branch=master)](https://coveralls.io/github/genofire/golang-lib?branch=master) [![GoDoc](https://godoc.org/github.com/genofire/golang-lib?status.svg)](https://godoc.org/github.com/genofire/golang-lib) +# golang-lib [![Build Status](https://travis-ci.org/genofire/golang-lib.svg?branch=master)](https://travis-ci.org/genofire/golang-lib) [![CircleCI](https://circleci.com/gh/genofire/golang-lib/tree/master.svg?style=shield)](https://circleci.com/gh/genofire/golang-lib/tree/master) [![Coverage Status](https://coveralls.io/repos/github/genofire/golang-lib/badge.svg?branch=master)](https://coveralls.io/github/genofire/golang-lib?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/genofire/golang-lib)](https://goreportcard.com/report/github.com/genofire/golang-lib) [![GoDoc](https://godoc.org/github.com/genofire/golang-lib?status.svg)](https://godoc.org/github.com/genofire/golang-lib) some packages collected for easy and often used functions diff --git a/circle.yml b/circle.yml index 1bd31dd..ac5a5bc 100644 --- a/circle.yml +++ b/circle.yml @@ -15,5 +15,4 @@ test: - go get -u github.com/mattn/goveralls - go get -u golang.org/x/tools/cmd/cover override: - - cd ${GOPATH}/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/ - - ${GOPATH}/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/.test-coverage circle-ci ${COVERALLS_REPO_TOKEN} + - ./.test-coverage circle-ci