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
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
26d43f4
Get E2E test coverage of chainlink node binary
lukaszcl Apr 15, 2024
b01b883
Fix
lukaszcl Apr 16, 2024
57a1d88
Fix lint
lukaszcl Apr 16, 2024
9f6f748
Merge branch 'develop' into TT-1049-Provide-e2e-coverage-reports-for-…
lukaszcl Apr 16, 2024
69debaa
Add step to upload go coverage folder
lukaszcl Apr 16, 2024
c04cbff
Fix
lukaszcl Apr 16, 2024
3f0c6f1
debug
lukaszcl Apr 16, 2024
a3315f7
Fix
lukaszcl Apr 16, 2024
27c5176
Fix lint
lukaszcl Apr 16, 2024
c4617a4
Debug
lukaszcl Apr 16, 2024
7d8aed8
Fix
lukaszcl Apr 16, 2024
958916c
Fix
lukaszcl Apr 17, 2024
932d149
Show coverage in github workflow console
lukaszcl Apr 17, 2024
ec1c8c4
Fix lint
lukaszcl Apr 17, 2024
b6464fb
Cleanup
lukaszcl Apr 17, 2024
e3e8ced
Add docs
lukaszcl Apr 17, 2024
168ff0f
Do not fail if no coverage dir was found
lukaszcl Apr 17, 2024
b194975
Update show_coverage.go to merge nodes coverage for each test
lukaszcl Apr 17, 2024
ccd37e3
Cleanup
lukaszcl Apr 17, 2024
a8d82a7
Merge branch 'develop' into TT-1049-Provide-e2e-coverage-reports-for-…
lukaszcl Apr 18, 2024
706167e
Update gha
lukaszcl Apr 18, 2024
fe2dfb3
Create NodeCoverageHelper and generate total coverage for all tests
lukaszcl Apr 18, 2024
4ca1e85
Update covdata artifact name
lukaszcl Apr 19, 2024
14f42fd
Fix
lukaszcl Apr 19, 2024
f4991b5
Merge branch 'develop' into TT-1049-Provide-e2e-coverage-reports-for-…
lukaszcl Apr 19, 2024
7cda8a0
Remove unnecessary build step
lukaszcl Apr 19, 2024
f212743
Update README
lukaszcl Apr 19, 2024
7df33ad
Fix
lukaszcl Apr 19, 2024
0cb0fe6
Update readme
lukaszcl Apr 19, 2024
42df261
Merge branch 'develop' into TT-1049-Provide-e2e-coverage-reports-for-…
lukaszcl Apr 19, 2024
fd0cbb1
Merge branch 'develop' into TT-1049-Provide-e2e-coverage-reports-for-…
lukaszcl Apr 19, 2024
17b6c56
Fix
lukaszcl Apr 19, 2024
e238b29
Fixes
lukaszcl Apr 22, 2024
81791eb
Merge branch 'develop' into TT-1049-Provide-e2e-coverage-reports-for-…
lukaszcl Apr 22, 2024
dde4c49
Remove ls step from workflow
lukaszcl Apr 22, 2024
9cc7af8
Merge branch 'develop' into TT-1049-Provide-e2e-coverage-reports-for-…
lukaszcl Apr 22, 2024
cd3b8f5
Fix action version and tag
lukaszcl Apr 22, 2024
9001a2c
Merge branch 'develop' into TT-1049-Provide-e2e-coverage-reports-for-…
lukaszcl Apr 22, 2024
712e4c3
Bump CTF
lukaszcl Apr 23, 2024
3859115
Merge branch 'develop' into TT-1049-Provide-e2e-coverage-reports-for-…
lukaszcl Apr 23, 2024
fb07194
Bump CTF
lukaszcl Apr 23, 2024
64b4f1c
Merge branch 'develop' into TT-1049-Provide-e2e-coverage-reports-for-…
lukaszcl Apr 24, 2024
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
Prev Previous commit
Next Next commit
Fix
  • Loading branch information
lukaszcl committed Apr 16, 2024
commit b01b883fec57e5241c6f54e17f3c68fe8d64ad3a
3 changes: 2 additions & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ jobs:
## Run this step when changes that require tests to be run are made
- name: Run Tests
if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch'
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@5dd916d08c03cb5f9a97304f4f174820421bb946 # v2.3.11
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@08210ca4289f40ae5f4d6b88bb9b7715a5864c37
with:
test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=${{ matrix.product.nodes }} ${{ steps.build-go-test-command.outputs.run_command }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage
test_download_vendor_packages_command: cd ./integration-tests && go mod download
Expand All @@ -385,6 +385,7 @@ jobs:
publish_check_name: ${{ matrix.product.name }}
token: ${{ secrets.GITHUB_TOKEN }}
go_mod_path: ./integration-tests/go.mod
go_coverage_dir: ./integration-tests/go-coverage
cache_key_id: core-e2e-${{ env.MOD_CACHE_VERSION }}
cache_restore_only: "true"
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
Expand Down
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ install-chainlink: operator-ui ## Install the chainlink binary.
go install $(GOFLAGS) .

.PHONY: install-chainlink-cover
install-chainlink: operator-ui ## Install the chainlink binary with cover flag.
install-chainlink-cover: operator-ui ## Install the chainlink binary with cover flag.
go install -cover $(GOFLAGS) .

.PHONY: chainlink
Expand Down
21 changes: 12 additions & 9 deletions integration-tests/docker/test_env/test_env_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,15 +258,18 @@ func (b *CLTestEnvBuilder) Build() (*CLClusterTestEnv, error) {
case CleanUpTypeStandard:
b.t.Cleanup(func() {
// Save test coverage profile from node containers
coverageDir := fmt.Sprintf("/tmp/coverage/%s", b.t.Name())
if err := os.MkdirAll(coverageDir, 0755); err != nil {
b.l.Error().Err(err).Str("coverageDir", coverageDir).Msg("Failed to create test coverage directory")
}
err = b.te.ClCluster.CopyFolderFromNodes(context.Background(), "/home/root/coverage", coverageDir)
if err != nil {
b.l.Error().Err(err).Msg("Failed to copy test coverage files from nodes")
} else {
b.l.Info().Str("coverageDir", coverageDir).Msg("Node test coverage files saved")
baseCoverageDir, isSet := os.LookupEnv("GO_COVERAGE_DIR")
if isSet {
testCoverageDir := fmt.Sprintf("%s/%s", baseCoverageDir, b.t.Name())
if err := os.MkdirAll(testCoverageDir, 0755); err != nil {
b.l.Error().Err(err).Str("coverageDir", testCoverageDir).Msg("Failed to create test coverage directory")
}
err = b.te.ClCluster.CopyFolderFromNodes(context.Background(), "/home/root/coverage", testCoverageDir)
if err != nil {
b.l.Error().Err(err).Msg("Failed to copy test coverage files from nodes")
} else {
b.l.Info().Str("coverageDir", testCoverageDir).Msg("Node test coverage files saved")
}
}

// Cleanup test environment
Expand Down
Loading