mirror of
https://github.com/retailcrm/api-client-go.git
synced 2025-04-14 22:40:57 +00:00
test
This commit is contained in:
parent
557db5a320
commit
7b07bcb311
1 changed files with 22 additions and 2 deletions
24
.github/workflows/ci.yml
vendored
24
.github/workflows/ci.yml
vendored
|
@ -14,7 +14,10 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: ['1.8', '1.9', '1.10', '1.11', '1.12', '1.13', '1.14']
|
||||
go-version: ['1.8', '1.9', '1.10', '1.11', '1.12', '1.13']
|
||||
include:
|
||||
go-version: '1.14'
|
||||
coverage: 1
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.go-version }}
|
||||
uses: actions/setup-go@v2
|
||||
|
@ -30,8 +33,25 @@ jobs:
|
|||
go get -v github.com/retailcrm/api-client-go/errs
|
||||
cp .env.dist .env
|
||||
- name: Tests
|
||||
run: ./go.test.sh
|
||||
env:
|
||||
COVERAGE: ${{ matrix.coverage }}
|
||||
if: env.COVERAGE != 1
|
||||
run: go test ./...
|
||||
- name: Tests with coverage
|
||||
env:
|
||||
COVERAGE: ${{ matrix.coverage }}
|
||||
if: env.COVERAGE == 1
|
||||
run: |
|
||||
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
|
||||
- name: Coverage
|
||||
env:
|
||||
COVERAGE: ${{ matrix.coverage }}
|
||||
if: env.COVERAGE == 1
|
||||
run: |
|
||||
bash <(curl -s https://codecov.io/bash)
|
||||
rm coverage.txt
|
||||
rm errs.out
|
||||
rm v5.out
|
Loading…
Add table
Reference in a new issue