From c12570411b005b2eafef9003f7059b4473428563 Mon Sep 17 00:00:00 2001 From: Akolzin Dmitry Date: Thu, 26 Nov 2020 12:24:49 +0300 Subject: [PATCH] fix run tests --- .github/workflows/ci.yml | 2 -- go.test.sh | 17 +++++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0398b96..08de440 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,9 +26,7 @@ jobs: run: | go get -v github.com/google/go-querystring/query go get -v github.com/h2non/gock - go get -v github.com/joho/godotenv go get -v github.com/retailcrm/api-client-go/errs - go get -v github.com/retailcrm/api-client-go/v5 cp .env.dist .env - name: Tests run: ./go.test.sh diff --git a/go.test.sh b/go.test.sh index d153907..4ed5b8a 100755 --- a/go.test.sh +++ b/go.test.sh @@ -4,12 +4,13 @@ set -e export DEVELOPER_NODE=1 export RETAILCRM_URL=https://test.retailcrm.pro export RETAILCRM_KEY=key -echo "" > coverage.txt +touch 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 +go test ./errs/ -race -coverprofile=errs.out -covermode=atomic "$d" +go test ./v5/ -race -coverprofile=v5.out -covermode=atomic "$d" + +cat errs.out >> coverage.txt +cat v5.out >> coverage.txt + +rm errs.out +rm v5.out