-
Notifications
You must be signed in to change notification settings - Fork 33
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
test: add code coverage support #347
Conversation
1f3df01
to
c522d57
Compare
4c72dec
to
c547bee
Compare
e258ecc
to
4db6ee6
Compare
2023-02-03T01:38:33.6924887Z GOCOVERDIR=. go build -tags "exclude_graphdriver_btrfs exclude_graphdriver_devicemapper containers_image_openpgp osusergo netgo " -ldflags "-X main.version=b9cbdb6efc7a274b0574764594a3f864b18a2951 -X main.lxc_version=5.0.0~git2209-g5a7b9ce67 " -o stacker-dynamic ./cmd/stacker 2023-02-03T01:48:48.9973555Z GOCOVERDIR=. go build -cover -covermode=atomic -coverpkg="./..." -tags "exclude_graphdriver_btrfs exclude_graphdriver_devicemapper containers_image_openpgp osusergo netgo static_build testrunmain" -ldflags "-X main.version=b9cbdb6efc7a274b0574764594a3f864b18a2951 -X main.lxc_version=727adc05220e9b8b594c5bc2124bef5b2e0abe7a -extldflags '-static'" -o stacker ./cmd/stacker |
https://pkgs.alpinelinux.org/package/edge/community/x86/go |
5e141cc
to
087eff4
Compare
Codecov Report
@@ Coverage Diff @@
## main #347 +/- ##
======================================
Coverage ? 6.60%
======================================
Files ? 58
Lines ? 6297
Branches ? 0
======================================
Hits ? 416
Misses ? 5819
Partials ? 62 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
76d52ae
to
f413e25
Compare
With golang 1.20.x, we can build a binary with coverage support. " Cover Go 1.20 supports collecting code coverage profiles for programs (applications and integration tests), as opposed to just unit tests. To collect coverage data for a program, build it with go build's -cover flag, then run the resulting binary with the environment variable GOCOVERDIR set to an output directory for coverage profiles. See the 'coverage for integration tests' landing page for more on how to get started. For details on the design and implementation, see the proposal. " Signed-off-by: Ramkumar Chinchani <[email protected]>
Signed-off-by: Ramkumar Chinchani <[email protected]>
Signed-off-by: Ramkumar Chinchani <[email protected]>
Signed-off-by: Ramkumar Chinchani <[email protected]>
Signed-off-by: Ramkumar Chinchani <[email protected]>
Signed-off-by: Ramkumar Chinchani <[email protected]>
Signed-off-by: Ramkumar Chinchani <[email protected]>
Signed-off-by: Ramkumar Chinchani <[email protected]>
Signed-off-by: Ramkumar Chinchani <[email protected]>
Signed-off-by: Ramkumar Chinchani <[email protected]>
Closing in favor of PR #550 |
Signed-off-by: Ramkumar Chinchani [email protected]
What type of PR is this?
Which issue does this PR fix:
What does this PR do / Why do we need it:
If an issue # is not available please add repro steps and logs showing the issue:
Testing done on this change:
Automation added to e2e:
Will this break upgrades or downgrades?
Does this PR introduce any user-facing change?:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.