[fix] update badges & coverage for earlier go versions

This commit is contained in:
Pavel 2019-10-16 16:54:59 +03:00
parent 76436cc054
commit a5074f72f5
3 changed files with 14 additions and 2 deletions

View File

@ -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)

View File

@ -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)

12
go.test.sh Executable file
View File

@ -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