exclude generated code from code coverage statistics

.codecov.yml is not working. We should filter out all
generated code that we don't want to be included in
the coverage report.
This commit is contained in:
Alessio Treglia 2020-03-26 23:33:48 +01:00
parent 6a9c8bcb78
commit fa7024d3e4
No known key found for this signature in database
GPG Key ID: E8A48AE5311D765A
1 changed files with 2 additions and 0 deletions

View File

@ -165,6 +165,8 @@ jobs:
name: filter out DONTCOVER
command: |
excludelist="$(find ./ -type f -name '*.go' | xargs grep -l 'DONTCOVER')"
excludelist+=" $(find ./ -type f -name '*.pb.go')"
excludelist+=" $(find ./ -type f -path './tests/mocks/*.go')"
for filename in ${excludelist}; do
filename=$(echo $filename | sed 's/^./github.com\/cosmos\/cosmos-sdk/g')
echo "Excluding ${filename} from coverage report..."