Skip to content
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

Show E2E test coverage of chainlink node binary #12835

Merged

Conversation

lukaszcl
Copy link
Collaborator

@lukaszcl lukaszcl commented Apr 16, 2024

This updates integration workflow to build chainlink image with cover flag to get coverage profiling during E2E tests. The E2E test coverage is shown in "Show Chainlink Node Go Coverage" workflow step. The coverage is calculated based on all executed E2E tests.

Example CI job:

Total coverage for all tests:
	github.com/smartcontractkit/chainlink/v2		coverage: 100.0% of statements
	github.com/smartcontractkit/chainlink/v2/common/client		coverage: 38.9% of statements
	github.com/smartcontractkit/chainlink/v2/common/config		coverage: 66.7% of statements
	github.com/smartcontractkit/chainlink/v2/common/fee		coverage: [18](https://github.com/smartcontractkit/chainlink/actions/runs/8743599561/job/23995064497?pr=12878#step:4:19).5% of statements
	github.com/smartcontractkit/chainlink/v2/common/fee/types			github.com/smartcontractkit/chainlink/v2/common/headtracker		coverage: 74.3% of statements
	github.com/smartcontractkit/chainlink/v2/common/headtracker/types			github.com/smartcontractkit/chainlink/v2/common/internal/utils		coverage: 57.1% of statements
	github.com/smartcontractkit/chainlink/v2/common/txmgr		coverage: 44.4% of statements
	github.com/smartcontractkit/chainlink/v2/common/txmgr/types		coverage: 63.0% of statements
	github.com/smartcontractkit/chainlink/v2/common/types		coverage: 0.0% of statements
	github.com/smartcontractkit/chainlink/v2/core		coverage: 57.1% of statements
	github.com/smartcontractkit/chainlink/v2/core/auth		coverage: 0.0% of statements
	github.com/smartcontractkit/chainlink/v2/core/bridges		coverage: 41.9% of statements
	github.com/smartcontractkit/chainlink/v2/core/build		coverage: 85.7% of statements

When Logging.show_html_coverage_report=true is set and the Chainlink Node image is built with the cover flag, an HTML coverage report will be generated for each test.

To build node image with cover flag run docker build with COVER_FLAG=true: docker buildx build --platform linux/arm64 . -t localhost/chainlink-local:develop -f ./core/chainlink.Dockerfile --build-arg COVER_FLAG=true

For now the coverage is only tracked for tests that use CleanUpTypeStandard.

@lukaszcl lukaszcl marked this pull request as ready for review April 16, 2024 11:36
@lukaszcl lukaszcl requested review from a team as code owners April 16, 2024 11:36
@lukaszcl lukaszcl changed the title Get E2E test coverage of chainlink node binary WIP: Get E2E test coverage of chainlink node binary Apr 16, 2024
@lukaszcl lukaszcl force-pushed the TT-1049-Provide-e2e-coverage-reports-for-docker-tests branch from d7a0587 to 3f0c6f1 Compare April 16, 2024 13:51
@lukaszcl lukaszcl force-pushed the TT-1049-Provide-e2e-coverage-reports-for-docker-tests branch from a4a8292 to a3315f7 Compare April 16, 2024 14:50
.github/workflows/integration-tests.yml Outdated Show resolved Hide resolved
.github/workflows/integration-tests.yml Outdated Show resolved Hide resolved
.github/workflows/integration-tests.yml Outdated Show resolved Hide resolved
.github/workflows/integration-tests.yml Outdated Show resolved Hide resolved
.github/workflows/integration-tests.yml Outdated Show resolved Hide resolved
.github/workflows/integration-tests.yml Outdated Show resolved Hide resolved
erikburt
erikburt previously approved these changes Apr 22, 2024
@lukaszcl lukaszcl enabled auto-merge April 22, 2024 17:28
@lukaszcl lukaszcl added this pull request to the merge queue Apr 22, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 22, 2024
@lukaszcl lukaszcl added this pull request to the merge queue Apr 22, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 22, 2024
@erikburt erikburt added this pull request to the merge queue Apr 22, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 22, 2024
@cl-sonarqube-production
Copy link

@lukaszcl lukaszcl added this pull request to the merge queue Apr 24, 2024
Merged via the queue into develop with commit 9ab3347 Apr 24, 2024
106 checks passed
@lukaszcl lukaszcl deleted the TT-1049-Provide-e2e-coverage-reports-for-docker-tests branch April 24, 2024 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants