summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorSmolevich <[email protected]>2019-11-13 10:57:01 +0300
committerSmolevich <[email protected]>2019-11-13 10:57:01 +0300
commitefd5f980c6c7b50678d3ad010eba2a1cca0b7d15 (patch)
treeb2ce93e552fd5aa572dd2b75565c013391d23c5a /.github
parentd2781e04318726d8b9fb1ad9903d58b1ab3eb741 (diff)
Add if condition for code coverage step
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci-build.yml33
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: