Create LICENSE.md

This commit is contained in:
Geno 2017-06-13 00:50:55 +02:00 committed by Martin Geno
parent 6abe71418f
commit fc00fdb7a3
No known key found for this signature in database
GPG Key ID: F0D39A37E925E941
4 changed files with 10 additions and 9 deletions

View File

@ -2,18 +2,20 @@
# Issue: https://github.com/mattn/goveralls/issues/20 # Issue: https://github.com/mattn/goveralls/issues/20
# Source: https://github.com/uber/go-torch/blob/63da5d33a225c195fea84610e2456d5f722f3963/.test-cover.sh # Source: https://github.com/uber/go-torch/blob/63da5d33a225c195fea84610e2456d5f722f3963/.test-cover.sh
CI=$1 CI=$1
TOKEN=$2
echo "run for $CI" 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 echo "mode: count" > profile.cov
FAIL=0 FAIL=0
# Standard go tooling behavior is to ignore dirs with leading underscors # 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 do
if ls $dir/*.go &> /dev/null; then 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 ] if [ -f profile.tmp ]
then then
tail -n +2 < profile.tmp >> profile.cov tail -n +2 < profile.tmp >> profile.cov
@ -24,7 +26,7 @@ done
# Failures have incomplete results, so don't send # Failures have incomplete results, so don't send
if [ "$FAIL" -eq 0 ]; then 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 fi
exit $FAIL exit $FAIL

View File

@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2017 Geno Copyright (c) 2017 genofire
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@ -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 some packages collected for easy and often used functions

View File

@ -15,5 +15,4 @@ test:
- go get -u github.com/mattn/goveralls - go get -u github.com/mattn/goveralls
- go get -u golang.org/x/tools/cmd/cover - go get -u golang.org/x/tools/cmd/cover
override: override:
- cd ${GOPATH}/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/ - ./.test-coverage circle-ci
- ${GOPATH}/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/.test-coverage circle-ci ${COVERALLS_REPO_TOKEN}