testthat icon indicating copy to clipboard operation
testthat copied to clipboard

Markdown summary on GHA

Open gaborcsardi opened this issue 3 years ago • 3 comments

Cf:https://github.com/r-lib/testthat/pull/1635#issuecomment-1143625018

  • [ ] maybe remove of the emoji from the table head?
  • [ ] remove (some?) of the emoji from the table body?
  • [ ] better printing of timings
  • [ ] check if we can link tests to the source code
  • [ ] distinguish between headings of multiple archs
  • [ ] "context" should be "file"
  • [ ] check if we can include the skip reason and the warning text in the table.
  • [ ] make "Test Details" the text of the dropdown.
  • [ ] consider removing the timings from the details.
  • [ ] consider also showing the slowest tests

gaborcsardi avatar Jun 01 '22 09:06 gaborcsardi

Some or all of this could also live in rcmdcheck, It could read the problems.rds file, which is saved by the check reporter. Then rcmdcheck could have a summary that includes check problems and also tests.

OTOH, for test coverage the table is very useful, because otherwise it is really hard to debug test failures there.

gaborcsardi avatar Jun 01 '22 13:06 gaborcsardi

Initial comments on summary at https://github.com/r-lib/testthat/actions/runs/2421804786.

This looks great! Lots of ideas/nitpicks below:

  • I think the emoji + text is too much because it's repeated for every job. I'd suggest maybe just text? (and in title case, not upper case)
  • I think you can remove the emoji from the data rows. Alternatively, for the details, you could just use the emoji (since the number isn't that important at the individual test level)
  • Round time to nearest 0.1?
  • How hard would it be to link the test name to the source of the test?
  • For windows latest (https://github.com/r-lib/testthat/actions/runs/2421804786#summary-6689959244), is it possible to adjust the titles to distinguish the test runs?
  • "context" should be "file" I think
  • How hard would it be to include the skip reason and the warning text? Maybe have another column where you can expand <detail> to get a code block containing what you'd see in the test itself?
  • For the test details, I think you could make "test details" the text of the dropdown, and then omit the heading?
  • The timings probably aren't that useful for the test details since you only see problems, not the bulk of the tests. Alternatively, you could maybe also show the slowest x tests? But maybe that works best in a separate table?

hadley avatar Jun 01 '22 13:06 hadley

@hadley Thanks for the feedback, I should have said that this is a first draft. :) Yeah, most of these are possible, many of them I was planning on doing. Others are more challenging, but definitely worth taking a better look. Details soon.

gaborcsardi avatar Jun 01 '22 13:06 gaborcsardi