Closed brendanheywood closed 2 years ago
Very nice find. +1
There is also a summary section that we can update to output well, the summary of the run which might be interesting to consider also.
https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/
I did have a play around with this and it is nice. And I agree that errors should be shown by default (so you don't have to expand to see it) and boring bits should be hidden.
Here's an example: https://github.com/catalyst/moodle-tool_dataflows/runs/7630401207?check_suite_focus=true#step:4:853
Small issue of having 2 collapsable items. One for the command, and another for the output of that command.
This can be updated from being 2*N to N+1 by having all the checks run in a single block, but I'm a bit on the fence with moving them all under a single run block.
This is much nicer. I'm not sure how to address the errors being shown because you don't know ahead of time if the groups should be open or close, and secondly I don't even think github supports saying it is open. I think it is worth doing even without this, if you search for something which is to me almost the only useful way of finding stuff, then it expands groups to find stuff inside
I also had the thought that maybe github was smart enough to expand any groups which had errors inside them but that isn't the case: https://github.com/brendanheywood/action/runs/7632594790?check_suite_focus=true
Small issue of having 2 collapsable items. One for the command, and another for the output of that command.
You can toggle the echo off and then back on: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#echoing-command-outputs
The echo toggling seems like an interesting option I might try out. Yeah it doesn't expand by default but I can catch the exit codes and decide from there. Going to try out summary as well and see how well that displays.
FYI, the node and moodle git clone I've checked off because I believe they are installed together during the "Install moodle" main step, run via this command:
moodle-plugin-ci install -vvv --plugin ./plugin --db-host=127.0.0.1
There are several sections in the logs where the signal to noise ratio is really poor. Ideally the logs should be broken up into collapsible sections, and if everything went right then each section should be collapsed and you get a log that might even fit on a single page or just a couple pages.
If on the other hand one of those sections had an error then it should not be collapsed so now you can focus just on the bit which is the error.
We can do this via:
https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#grouping-log-lines
Some obvious candidates are: