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

docs: Tutorial: Go coverage profiles for e2e tests #8558

Conversation

halvards
Copy link
Collaborator

New tutorial that shows how to use Skaffold post-deploy hooks to collect coverage profiles from integration tests, often called end-to-end tests, of Go applications.

This takes advantage of new functionality in Go 1.20: https://go.dev/testing/coverage/

I couldn't find a way to include files from the examples directory in the tutorial Markdown, so instead of duplicating files from the example in the docs-v2 directory, the tutorial instead points readers to the files in the examples directory.

halvards added a commit to halvards/skaffold that referenced this pull request Apr 20, 2023
halvards added a commit to halvards/skaffold that referenced this pull request Apr 20, 2023
This also required upgrading GolangCI-Lint, which in turn found an
unused field that appears to have previously gone undetected.

Related: GoogleContainerTools#8558
ericzzzzzzz pushed a commit that referenced this pull request Apr 20, 2023
This also required upgrading GolangCI-Lint, which in turn found an
unused field that appears to have previously gone undetected.

Related: #8558
@aaron-prindle
Copy link
Contributor

Thanks for the PR here Halvard! Can you rebase this? Also it seems the Verify examples test is failing here atm.

@halvards halvards force-pushed the tutorial-go-integration-coverage branch from c124558 to 5ade5aa Compare April 27, 2023 23:55
New tutorial that shows how to use Skaffold post-deploy hooks to collect
coverage profiles from integration tests, often called end-to-end tests,
of Go applications.

This takes advantage of new functionality in Go 1.20:
https://go.dev/testing/coverage/

I couldn't find a way to include files from the `examples` directory in
the tutorial Markdown, so instead of duplicating files from the example
in the `docs-v2` directory, the tutorial instead points readers to the
files in the `examples` directory.
@halvards halvards force-pushed the tutorial-go-integration-coverage branch from 5ade5aa to 2041501 Compare April 28, 2023 00:06
@codecov
Copy link

codecov bot commented Apr 28, 2023

Codecov Report

Merging #8558 (2041501) into main (290280e) will decrease coverage by 6.04%.
The diff coverage is 49.59%.

@@            Coverage Diff             @@
##             main    #8558      +/-   ##
==========================================
- Coverage   70.48%   64.45%   -6.04%     
==========================================
  Files         515      617     +102     
  Lines       23150    31168    +8018     
==========================================
+ Hits        16317    20088    +3771     
- Misses       5776     9575    +3799     
- Partials     1057     1505     +448     
Impacted Files Coverage Δ
cmd/skaffold/app/cmd/completion.go 13.04% <0.00%> (-1.25%) ⬇️
cmd/skaffold/app/cmd/config/list.go 65.21% <ø> (ø)
cmd/skaffold/app/cmd/config/set.go 88.72% <ø> (ø)
cmd/skaffold/app/cmd/config/util.go 54.28% <ø> (ø)
cmd/skaffold/app/cmd/credits.go 100.00% <ø> (ø)
cmd/skaffold/app/cmd/credits/export.go 0.00% <0.00%> (ø)
cmd/skaffold/app/cmd/deploy.go 40.90% <0.00%> (-12.94%) ⬇️
cmd/skaffold/app/cmd/generate_pipeline.go 60.00% <ø> (ø)
cmd/skaffold/app/cmd/inspect_modules.go 65.00% <ø> (ø)
cmd/skaffold/app/cmd/inspect_profiles.go 66.66% <ø> (ø)
... and 40 more

... and 406 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@aaron-prindle aaron-prindle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@aaron-prindle aaron-prindle merged commit 54cfe72 into GoogleContainerTools:main Apr 28, 2023
13 checks passed
@halvards halvards deleted the tutorial-go-integration-coverage branch May 1, 2023 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants