Add CodeCov GitHub Action (#467)
* Add CodeCov GitHub Action * Address Sundar's comment about blocking on coverage. Since currently testing of components-contrib usually require building with dapr/dapr, we don't yet have a lot of coverage. So we shouldn't block PRs based on that.
This commit is contained in:
parent
dd888565d7
commit
677645e191
|
|
@ -0,0 +1,15 @@
|
|||
coverage:
|
||||
# Commit status https://docs.codecov.io/docs/commit-status are used
|
||||
# to block PR based on coverage threshold.
|
||||
status:
|
||||
project:
|
||||
default:
|
||||
informational: true
|
||||
patch:
|
||||
# Disable the coverage threshold of the patch, so that PRs are
|
||||
# only failing because of overall project coverage threshold.
|
||||
# See https://docs.codecov.io/docs/commit-status#disabling-a-status.
|
||||
default: false
|
||||
comment:
|
||||
# Delete old comment and post new one for new coverage information.
|
||||
behavior: new
|
||||
|
|
@ -60,5 +60,10 @@ jobs:
|
|||
if: matrix.target_arch != 'arm'
|
||||
run: make go.mod check-diff
|
||||
- name: Run make test
|
||||
env:
|
||||
COVERAGE_OPTS: "-coverprofile=coverage.txt -covermode=atomic"
|
||||
if: matrix.target_arch != 'arm'
|
||||
run: make test
|
||||
- name: Codecov
|
||||
if: matrix.target_arch == 'amd64' && matrix.target_os == 'linux'
|
||||
uses: codecov/codecov-action@v1
|
||||
|
|
|
|||
Loading…
Reference in New Issue