-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
ci: switch to Coveralls' first-party GitHub Action #2551
base: master
Are you sure you want to change the base?
Conversation
The Coveralls action is supposed to be more or less a drop-in replacement for the ls -la debug output showing .coverage file
Coveralls action failing to find/upload .coverage file
|
9e30f50
to
7b712ea
Compare
For fun, I tried to run
The job now has a new step to generate a report in Lcov format ( |
Hmm, this changed some things and I think it's considering some things covered that shouldn't be, hence the +0.6% bump. For example, some information about branches seems to be lost or corrupted. Look at I also noticed that if I take Guess this is going back to draft status again. |
Filed coverallsapp/coverage-reporter#109 for the |
7b712ea
to
5a8f991
Compare
The missing link here was generating an XML coverage report, instead of LCOV. coverallsapp/coverage-reporter#109 (comment) However, I do need to still track down a problem with the tree view after switching. The top-level Compare to the previous PR build: The files are still tracked and available in the "List" tab, but it's not ideal to show only part of the tree under "Tree". |
Dropped `coveralls` dev-requirement in favor of using the `coverage` package directly, and upgraded it to the latest release series (7.x). The `line_bits` table in .coverage (SQLite DB of results, generated by `coverage`) isn't populated. coverallsapp/coverage-reporter tries an SQL query against the database based on this empty table, and fails because there aren't any coverage results to upload. We work around this by having `coverage xml` generate a file format that the reporter can understand. In `.coveragerc`, switched from setting the `source` option to using the `include` option instead; this fixes incorrect relative paths being reported to Coveralls (which breaks both source-fetching and the tree).
5a8f991
to
141eccb
Compare
OK! The good news is, fixing the screwed-up tree/source views was pretty simple. Bad news is that display of branch coverage is still partially broken on Coveralls with this new pipeline—uploading the XML report turns yellow (partially covered) branch points green, which is a direct step backwards in terms of report readability. I'm going to continue the existing conversation in coverallsapp/coverage-reporter#109 and/or keep an eye on work toward getting direct parsing of |
New release today is supposed to fix the issues with Python coverage parsing. We will see!
Hm, still does not seem to report There is also a "Drifted build" warning, but that should be easier to solve later after the main coverage-reporting issue is settled. |
@dgw dropping by to address just the relatively new changes and recommendations re: "drifted builds." A "drifted build" is a In these instances, since GitHub Therefore, we make some, again, relatively new recommendations around Configuring your CI service for accurate PR coverage reports, and document Ideal and Minimum CI configurations. The Ideal configuration (build all The Minimum configuration (build Please let me know if you have any thoughts or suggestions. |
@afinetooth Thanks for the rundown! We aren't so attached to the coverage diff of each patch being perfectly accurate, and I suspect we will keep the current CI setup (build all It hasn't caused a problem for us in the past, so there's no reason to increase our load on GHA infra (building more |
Hi @dgw.
Makes complete sense. In case it's helpful, one way to increase your sense that coverage is moving in the right direction is to use patch status updates, which give you the coverage for each patch itself (as opposed to the coverage diff). When you see those updates in the positive, it means new code is coming in covered and you generally know that coverage is increasing for the PR and for the project. You can enable that in your Repo Settings: Under STATUS UPDATES:
That's good and also totally makes sense. At the risk of sounding like I'm trying to sell you on the "ideal" config, I did just want to explain two more things, which aren't necessarily very clear:
|
Description
This is a first step toward improving our Coveralls integration based on advice in lemurheavy/coveralls-public#1733. We should also keep an eye out for PR builds that display a message about being out of sync with the target branch; that might necessitate separate changes to how and when this CI workflow runs (explained in the issue and in upstream documentation).
Checklist
make qa
(runsmake lint
andmake test
)