Add colour to GitHub Actions output#129196
Merged
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Following the merge of #127223, #127719, #127877, #128498 and #128687, we can now enable colour in the
unittestandtest.regrtestoutput on GitHub Actions usingFORCE_COLOR.The biggest benefit is it helps us find failures when scrolling the long logs, and usually the reason to open the logs in the first place is to find a failure.
For example, here's a forced failure in another branch:
https://github.com/hugovk/cpython/actions/runs/12915439756/job/36017613160
Accessibility check: it's important not to rely on colour alone to confer information, and the current textual output is not changed, and continues to say pass/skip/fail as now. The colour is an addition.