diff options
author | Smolevich <[email protected]> | 2019-11-13 10:57:01 +0300 |
---|---|---|
committer | Smolevich <[email protected]> | 2019-11-13 10:57:01 +0300 |
commit | efd5f980c6c7b50678d3ad010eba2a1cca0b7d15 (patch) | |
tree | b2ce93e552fd5aa572dd2b75565c013391d23c5a /.github | |
parent | d2781e04318726d8b9fb1ad9903d58b1ab3eb741 (diff) |
Add if condition for code coverage step
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/ci-build.yml | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index e3392357..3031cbb4 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -40,7 +40,7 @@ jobs: go env fi env: - DEBUG: ${{secrets.DEBUG}} + DEBUG: ${{ secrets.DEBUG }} - name: Show versions run: | @@ -71,16 +71,21 @@ jobs: go test ./service/health -race -v -coverprofile=health.txt -covermode=atomic - name: Run code coverage run: | - curl https://codecov.io/bash -o codecov-bash - chmod +x codecov-bash - ./codecov-bash -f lib.txt - ./codecov-bash -f util.txt - ./codecov-bash -f service.txt - ./codecov-bash -f env.txt - ./codecov-bash -f rpc.txt - ./codecov-bash -f http.txt - ./codecov-bash -f static.txt - ./codecov-bash -f limit.txt - ./codecov-bash -f headers.txt - ./codecov-bash -f metrics.txt - ./codecov-bash -f health.txt + if [[ "$CODECOV_TOKEN" != "" ]]; then + curl https://codecov.io/bash -o codecov-bash + chmod +x codecov-bash + ./codecov-bash -f lib.txt + ./codecov-bash -f util.txt + ./codecov-bash -f service.txt + ./codecov-bash -f env.txt + ./codecov-bash -f rpc.txt + ./codecov-bash -f http.txt + ./codecov-bash -f static.txt + ./codecov-bash -f limit.txt + ./codecov-bash -f headers.txt + ./codecov-bash -f metrics.txt + ./codecov-bash -f health.txt + fi + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + if: |