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

Document GitLab CI integration #405

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jaskij
Copy link

@jaskij jaskij commented Dec 11, 2024

rendered view

As discussed in #398 , this documents how to integrate cargo-llvm-cov with GitLab CI.

As of now, there's several things missing to be resolved, but I wanted to open the PR as a starting point. For now, this is a draft.

  • test coverage rendering
  • splitting the Cobertura report into multiple files to obey GitLab limits
  • which coverage in the summary?

Coverage rendering

This I will do soon, but due to the way GitLab renders only diffed files in MRs/PRs, I did not have an opportunity to test.

Splitting

While it's generally out of scope to describe the whole issue, adding a single sentence mention with a link to GitLab's documentation will probably be the right call.

Which coverage in summary

For now, the regex I'm using will use region coverage - I felt it'd be the most accurate, but I can just as easily extract function or line coverage.

@jaskij
Copy link
Author

jaskij commented Dec 11, 2024

cc @mike-kfed

@jaskij
Copy link
Author

jaskij commented Dec 11, 2024

Hrmm... CI tells me I made a spelling mistake, but not where. And I'm not seeing it.

I added that note about report size limits

@mike-kfed
Copy link
Contributor

looks like the markdown lint fails:

README.md:596 MD028/no-blanks-blockquote Blank line inside blockquote
README.md:600:2 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]

seems like tidy.sh runs all checks no matter what and returns an error code if any of them failed.

@jaskij
Copy link
Author

jaskij commented Dec 12, 2024

Thanks for pointing that out. I fixed the trailing whitespace, but left the empty line as is - it's there on purpose, and I'm explicitly using GitHub Flavored Markdown here. Which, I'm not sure that I should.

In the meantime, I was working on my project using these coverage reports, and can now confirm - they are displayed correctly, although it is only a line-based report.

Overall, I'm fine with how it is now.

@jaskij jaskij marked this pull request as ready for review December 12, 2024 07:37
@taiki-e taiki-e force-pushed the main branch 2 times, most recently from 932a369 to 67a45bf Compare December 18, 2024 19:57
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.

2 participants