-
Notifications
You must be signed in to change notification settings - Fork 2.8k
chore(ci): speed-up & coveralls #5870
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(ci): speed-up & coveralls #5870
Conversation
|
Skipping CI for Draft Pull Request. |
3d9bcc0 to
63129d3
Compare
Pull Request Test Coverage Report for Build 18088343560Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
|
@ivankatliarchuk @AndrewCharlesHay @TobyTheHutt I managed to get the PR comment and the status in the CI. FTM, it's configured like this on threshold: Wdyt ? Anything missing ? |
|
Maybe I'm missing something important. I don't see how Coveralls is acceptable in this implementation, since to me, the conflict mentioned in #5854 is still valid and open. But if it's just about the minimum coverage, I can propose a Makefile extension like the following: go-test:
GOCACHE=$(GOCACHE) go test -race -covermode=$(COVERMODE) -coverprofile=$(COVERFILE) ./...
@GOCACHE=$(GOCACHE) go tool cover -func=$(COVERFILE) > coverage.summary
@awk '/^total:/ { if ($$3+0 < $(COVER_THRESHOLD)) { printf "Coverage %.1f%% is below threshold $(COVER_THRESHOLD)%%\n", $$3+0; exit 1 } }' coverage.summary
@echo "Coverage check passed (>= $(COVER_THRESHOLD)% )"
If we wanted, we could even split the coverage check on individual packages. |
|
We need to enable an app as well on repo level for coveralls to works in the way it should. |
|
/lgtm |
|
@TobyTheHutt I agree with you that it's good to have a local command in Makefile. I added a By taking a look at the coverage summary, we can see it's not that easy as putting a threshold on each line of the summary. For instance, we can see that some are at 0%, like those ones: sigs.k8s.io/external-dns/apis/v1alpha1/zz_generated.deepcopy.go:13: DeepCopyInto 0.0%
sigs.k8s.io/external-dns/apis/v1alpha1/zz_generated.deepcopy.go:22: DeepCopy 0.0%
sigs.k8s.io/external-dns/apis/v1alpha1/zz_generated.deepcopy.go:32: DeepCopyObject 0.0%
sigs.k8s.io/external-dns/apis/v1alpha1/zz_generated.deepcopy.go:40: DeepCopyInto 0.0%
sigs.k8s.io/external-dns/apis/v1alpha1/zz_generated.deepcopy.go:54: DeepCopy 0.0%
sigs.k8s.io/external-dns/apis/v1alpha1/zz_generated.deepcopy.go:64: DeepCopyObject 0.0%
sigs.k8s.io/external-dns/apis/v1alpha1/zz_generated.deepcopy.go:72: DeepCopyInto 0.0%
sigs.k8s.io/external-dns/apis/v1alpha1/zz_generated.deepcopy.go:88: DeepCopy 0.0%
sigs.k8s.io/external-dns/apis/v1alpha1/zz_generated.deepcopy.go:98: DeepCopyInto 0.0%
sigs.k8s.io/external-dns/apis/v1alpha1/zz_generated.deepcopy.go:103: DeepCopy 0.0%And it's expected, it's on generated code. We have also many not-covered func: $ awk '{ if ($3 == "0.0%") { printf "%s: %s\n", $1, $3 } }' < coverage.summary | wc -l
233So far, I fail to see how we can set easily a minimum threshold. ExternalDNS current coverage is around 78%, so I set 75% as a start point. IMHO, we should take care of not making this as a blocker and go step by step. @TobyTheHutt Does that address your concerns about this topic ? Or is your concern is more about using an online solution like coveralls ? |
|
@mloiseleur Thank you for the feedback! I agree that this discussion should not block the PR. My concern has been properly addressed and I have no objections to this PR. |
|
@AndrewCharlesHay I'll need your review on this PR and we should be good to go. |
|
/lgtm |
|
Thanks! |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mloiseleur The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* master: (175 commits) chore(deps): bump renovatebot/github-action (kubernetes-sigs#5890) chore(cloudflare): migrate DeleteCustomHostname() to new lib (kubernetes-sigs#5880) docs(advanced): configuration precedence (kubernetes-sigs#5871) test: update goversion label to 1.25 in metrics test (kubernetes-sigs#5886) ci(linter): add go-critic (kubernetes-sigs#5875) docs(providers): add info about Myra protection option and docker image (kubernetes-sigs#5879) refactor(pihole): reduce cyclomatic complexity of TestProviderV6 (kubernetes-sigs#5876) test(source/service): add serviceTypeFilter edge case (kubernetes-sigs#5872) chore(ci): speed-up & coveralls (kubernetes-sigs#5870) feat(provider/cloudflare): add support for tags (kubernetes-sigs#5862) chore(deps): bump renovatebot/github-action (kubernetes-sigs#5874) feat: add new flags to allow migration of OwnerID (kubernetes-sigs#4823) docs(volcengine): add volcengine provider to readme (kubernetes-sigs#5866) chore(deps): bump renovatebot/github-action (kubernetes-sigs#5856) docs improve txt registry documentation formatting and examples for apex record (kubernetes-sigs#5863) chore: upgrade ExternalDNS to go v1.25 and golangci-lint v2.5 (kubernetes-sigs#5869) refactor(pihole): reduce cyclomatic complexity of TestProvider (kubernetes-sigs#5865) refactor(service): reduce cyclomatic complexity of extractHeadlessEndpoints (kubernetes-sigs#5822) test(cloudflare): clear environment variables before setting test values (kubernetes-sigs#5851) fix(endpoint/source) Allow '.' in TXT Records (kubernetes-sigs#5844) ...

What does it do ?
make testMotivation
More