Skip to content

chore(ci): add workflow to generate test coverage and report to DeepSource#177

Closed
MashyBasker wants to merge 8 commits intoDeepSourceCorp:masterfrom
MashyBasker:chore/testcov-ci
Closed

chore(ci): add workflow to generate test coverage and report to DeepSource#177
MashyBasker wants to merge 8 commits intoDeepSourceCorp:masterfrom
MashyBasker:chore/testcov-ci

Conversation

@MashyBasker
Copy link
Contributor

Purpose

Adds a workflow to generate test reports for Go code and sends the coverage to DeepSource.

…urce

Signed-off-by: Maharshi Basu <basumaharshi10@gmail.com>
@vercel
Copy link

vercel bot commented Mar 25, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
globstar ⬜️ Ignored (Inspect) Visit Preview Mar 25, 2025 6:22pm

Signed-off-by: Maharshi Basu <basumaharshi10@gmail.com>
Signed-off-by: Maharshi Basu <basumaharshi10@gmail.com>
Signed-off-by: Maharshi Basu <basumaharshi10@gmail.com>
Signed-off-by: Maharshi Basu <basumaharshi10@gmail.com>
Signed-off-by: Maharshi Basu <basumaharshi10@gmail.com>
Signed-off-by: Maharshi Basu <basumaharshi10@gmail.com>
@@ -1,3 +1,5 @@
//go:build exclude
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a better way to do these exclusions instead of having to add them in every checker?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can place test files inside a folder prefixed with an underscore (e.g., _testdata). However, the YAML test runner currently only looks for tests in the current directory. Once we add support for test folders in YAML-based checkers, we can remove the exclusion directives.

@@ -0,0 +1,35 @@
name: automatic-test-coverage-report
Copy link
Contributor

Choose a reason for hiding this comment

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

This workflow should simply be named "run unit tests" or something. Reporting coverage is a part of running the test suite.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in latest commit.

Signed-off-by: Maharshi Basu <basumaharshi10@gmail.com>
@MashyBasker MashyBasker changed the title chore/ci: add workflow to generate test coverage and report to DeepSource chore(ci): add workflow to generate test coverage and report to DeepSource Apr 17, 2025
@sourya-deepsource
Copy link
Contributor

@unnxt30 is working on test coverage reporting in a separate PR.

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.

3 participants