-
Notifications
You must be signed in to change notification settings - Fork 706
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
Create merged coverage to html #1318
Conversation
Signed-off-by: Amit Kumar <kramit6662@gmail.com>
Signed-off-by: Amit Kumar <kramit6662@gmail.com>
.github/workflows/ci.yml
Outdated
uses: actions/checkout@v3 | ||
|
||
- name: Run Tests | ||
run: ./run-tests.sh 6.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't make much sense. vm-test
has a test matrix that runs this against a wide range of kernel versions, and we need test coverage for each of them.
The point is to add coverage reporting to the existing vm-test
, test-on-prev-go
and test-on-arm64
jobs. Ideally, this would all be done in a single step to keep the size of the yaml a bit manageable:
- run: go tool covdata merge -o coverage-merged.out
- run: go tool cover -html=coverage-merged.out -o coverage.html
- name: Upload Coverage Report
uses: actions/upload-artifact@v3
with:
name: coverage-report
path: |
./coverage-merged.out
./coverage.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will I have to add this to all three job or it can be done in another separate job?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want coverage for all three jobs (we do), then yes, it needs to be in all three. 🙂
Signed-off-by: Amit Kumar <kramit6662@gmail.com>
Hello @ti-mo, I have got an error about input directories, from which it will merge data from multiple dirs. What should I use for input directories? |
Closing this for now. |
It generates
coverage.out
as an artifact and merges it tocoverage.html
.fixes #1256