1
0
Fork 0
mirror of https://github.com/retailcrm/api-client-go.git synced 2025-04-08 03:22:03 +00:00

fix run tests

This commit is contained in:
Akolzin Dmitry 2020-11-26 12:24:49 +03:00
parent 2037e45da6
commit c12570411b
2 changed files with 9 additions and 10 deletions
.github/workflows
go.test.sh

View file

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

View file

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