From a5074f72f53b48cdc180130e744d180e0bce4293 Mon Sep 17 00:00:00 2001 From: Pavel Date: Wed, 16 Oct 2019 16:54:59 +0300 Subject: [PATCH] [fix] update badges & coverage for earlier go versions --- .travis.yml | 2 +- README.md | 2 +- go.test.sh | 12 ++++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100755 go.test.sh diff --git a/.travis.yml b/.travis.yml index a2c5670..62acb07 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,6 @@ before_install: - go get -v github.com/google/go-querystring/query - go get -v github.com/h2non/gock - cp .env.dist .env -script: go test -race -coverprofile=coverage.txt -covermode=atomic -v ./... +script: ./go.test.sh after_success: - bash <(curl -s https://codecov.io/bash) diff --git a/README.md b/README.md index 1549bf8..5376d63 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Build Status](https://img.shields.io/travis/retailcrm/api-client-go/master.svg?logo=travis&style=flat-square)](https://travis-ci.org/retailcrm/api-client-go) [![GitHub release](https://img.shields.io/github/release/retailcrm/api-client-go.svg?style=flat-square)](https://github.com/retailcrm/api-client-go/releases) -[![GoLang version](https://img.shields.io/badge/go-1.8%2C%201.9%2C%201.10-blue.svg?style=flat-square)](https://golang.org/dl/) +[![GoLang version](https://img.shields.io/badge/go-1.8%20--%201.13-blue?style=flat-square)](https://golang.org/dl/) [![Godoc reference](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](https://godoc.org/github.com/retailcrm/api-client-go) diff --git a/go.test.sh b/go.test.sh new file mode 100755 index 0000000..7141c0d --- /dev/null +++ b/go.test.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -e +echo "" > coverage.txt + +for d in $(go list ./... | grep -v vendor); do + go test -race -coverprofile=profile.out -covermode=atomic "$d" + if [ -f profile.out ]; then + cat profile.out >> coverage.txt + rm profile.out + fi +done \ No newline at end of file