Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 22 additions & 21 deletions .codecov.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
coverage:
# Commit status https://docs.codecov.io/docs/commit-status are used
# to block PR based on coverage threshold.
status:
project:
default:
target: auto
threshold: 5%
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

ignore:
# Auto-generated protobuf code.
- "proto/v1alpha2/results_go_proto/**"
- "proto/v1alpha3/results_go_proto/**"
- "proto/pipeline/v1/pipeline_go_proto/**"
- "pkg/api/server/db/pagination/proto/internal_go_proto/**"
- "pkg/api/server/v1alpha2/lister/proto/pagetoken_go_proto/**"
- "internal/fieldmask/test/**"
- "pkg/test/**"
- "cmd/**"
- "test/**"
- "config/**"
- "hack/**"
- "tools/**"
- "release/**"
- "tekton/**"
- "docs/**"
- "vendor/**"
- "proto"
- "**/*.pb.go"
- "**/fake/**"
# Entry-point binaries.
- "cmd"
# Test infrastructure.
- "test"
- "pkg/test/"
- "pkg/internal/test/"
- "pkg/api/server/test/"
- "internal/fieldmask/test/"
- "pkg/cli/testutils/"
# Non-executable files (doc, go:generate).
- "**/doc.go"
- "**/generate.go"
- "config"
- "hack"
- "tools"
- "release"
- "tekton"
- "docs"
- "vendor"
7 changes: 6 additions & 1 deletion .github/workflows/go-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ jobs:
- name: Generate coverage
working-directory: ${{ github.workspace }}/src/github.com/tektoncd/results
run: |
go test ./... -coverprofile=coverage.out -covermode=atomic || true
PACKAGES=$(go list ./... | grep -vE '/cmd(/|$)|/vendor(/|$)|/hack(/|$)|/test(/|$)|/tools(/|$)|/release(/|$)|/tekton(/|$)|/docs(/|$)|/config(/|$)|/proto(/|$)|/pkg/test(/|$)|/pkg/internal/test(/|$)|/pkg/api/server/test(/|$)|/pkg/cli/testutils(/|$)|/internal/fieldmask/test(/|$)|_go_proto(/|$)')
COVERPKG=$(echo $PACKAGES | tr ' ' ',')
go test -coverprofile=coverage_raw.out -covermode=atomic -coverpkg="$COVERPKG" $PACKAGES
grep -vE '\.pb\.go' coverage_raw.out > coverage.out
rm -f coverage_raw.out
echo "Generated coverage profile"

- name: Upload coverage to Codecov
Expand All @@ -54,3 +58,4 @@ jobs:
flags: unit-tests
use_oidc: true
fail_ci_if_error: false
disable_search: true
Loading