coveralls-python-action icon indicating copy to clipboard operation
coveralls-python-action copied to clipboard

Feature Request: Post results as a comment in the PR

Open lexicalunit opened this issue 4 years ago • 7 comments

I tried for a couple hours to get https://github.com/marketplace/actions/coveralls-github-action together with https://pypi.org/project/coveralls/ working correctly and it just never did.

But your action worked perfectly my first attempt! Thank you! 🎉

One thing that would be nice that I think coveralls-github-action does is that it posts a detailed comment to the PR with results linking to the coveralls report as well. Without this it's not obvious where to find the report, or that it even exists, unless you go looking for it on coveralls.io yourself.

lexicalunit avatar Apr 23 '20 08:04 lexicalunit

Thanks @lexicalunit, Coud you share an example of how it should look like if you ever saw it working somewhere?

AndreMiras avatar Apr 23 '20 17:04 AndreMiras

Sadly I don't know of any examples. I'm just going off the documentation which says that it does make a comment with such details.

lexicalunit avatar Apr 23 '20 18:04 lexicalunit

Then it might be what we already support as we see in this screenshot: coveralls-python-action Basically if the coverage is the same or increases it won't complain. But it still "comments" with a "Details" link.

AndreMiras avatar Apr 23 '20 20:04 AndreMiras

So those links work just fine, but those are only active when the checks are running or if one of the checks has failed. If the checks ran and ran without errors, then all those checks get rolled up and aren't immediately visible anymore. Also sometimes if you aren't using parallel tests you may have your coveralls step not broken out like that, so you'd only see one single check, and you'd have no indication that the test included any sort of coverage tests.

That's why most tools, including https://github.com/marketplace/actions/coveralls-github-action according to its own documentation, and indeed also codecov do things like you see in this PR: https://github.com/theastropath/turbot/pull/68

Where the final step will be to create and/or update a comment in the PR (and only if the build is based on a PR, it wouldn't do it for a push event) with details about the run.

All I know is that https://github.com/marketplace/actions/coveralls-github-action claims to support this feature... I'm sure if it does there must be some project out there somewhere with an example of what their comment might look like.

lexicalunit avatar Apr 23 '20 20:04 lexicalunit

Ah, I found an example in the wild of a comment like this: https://github.com/repetere/modelx/pull/3#issuecomment-614988802

lexicalunit avatar Apr 23 '20 20:04 lexicalunit

Very nice, I thought only codecov was capable of it. Have an example really helps. Well I'll look into it then

AndreMiras avatar Apr 25 '20 10:04 AndreMiras

With this config, I get the standard GH "CI box" (here, heading "Some checks were not successful"). The "Details" link from "coveralls_finish (pull_request)" just points to the Actions tab for the check, where there is no link to Coveralls.io, nor anything else useful, really (I verified that the results were actually posted correctly to Coveralls, although the "Commit Message" there (on Coveralls.io) is a garbled mess of HTML... :thinking:).

Am I missing some necessary magic to get any link to Coveralls.io?

EIT: Self answer. It really does require coverage run --source=foo_src -m pytest tests/ instead of e.g. pytest --cov=foo_src tests/

ben-alkov avatar Jun 04 '20 20:06 ben-alkov

Hello,

We have an exciting opportunity for you! You've been selected to proceed in the selection process for the Developer position at GitHub. Congratulations on your achievement!

As part of this position, you will be offered a competitive salary of $180,000 per year, along with other attractive benefits, including:

  • Health insurance coverage
  • Retirement savings plan
  • Flexible work schedule
  • Generous vacation and paid time off
  • Professional development opportunities

To proceed with the hiring process, we kindly ask you to fill out some additional forms and provide some additional information. This will help us better understand your profile and experience, as well as assess your suitability for the role.

Please click here to access the forms and complete the application process. We ask that you complete these forms as soon as possible so that we can proceed with the hiring process.

Important: You have 24 hours to complete the application process.

If you have any questions or need further information, please don't hesitate to contact us.

Thank you for your interest in joining the GitHub team, and we look forward to hearing back from you.

Best regards,
GitHub Recruitment Team M11158002, @victorfrancax1, @PeacefulBY, @soulmachine, @NetOpWibby, @0xK4d1r, @anoushk1234, @5l1v3r1, @anastasiarods, @blockchain-hcj, @ashrafulrahmansakil, @ruuderie, @LiangMa, @ahashim, @p7n8zk, @junghoon-vans, @geofmureithi, @ind-igo, @sug0, @ConnieFrazee

thangtq-pionero avatar Feb 20 '24 01:02 thangtq-pionero