Skip to content
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

Add colour to GitHub Actions output #129196

Merged
merged 2 commits into from
Jan 22, 2025
Merged

Add colour to GitHub Actions output #129196

merged 2 commits into from
Jan 22, 2025

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Jan 22, 2025

Following the merge of #127223, #127719, #127877, #128498 and #128687, we can now enable colour in the unittest and test.regrtest output on GitHub Actions using FORCE_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:

image

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.

Copy link
Member

@brandtbucher brandtbucher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JIT CI changes look good!

.github/workflows/reusable-macos.yml Outdated Show resolved Hide resolved
@hugovk
Copy link
Member Author

hugovk commented Jan 22, 2025

Thank you flaky test, it was easy to find you and conclude not relevant here, and restart the job :)

image

https://github.com/python/cpython/actions/runs/12916819582/job/36021859818?pr=129196

@hugovk hugovk enabled auto-merge (squash) January 22, 2025 21:13
@hugovk
Copy link
Member Author

hugovk commented Jan 22, 2025

unittest and test.regrtest don't have colour in 3.13 or earlier, but let's backport these to keep the diffs between the files smaller for future backports, and it can enable colour in any other tools on the CI that support it.

@hugovk hugovk added needs backport to 3.12 bug and security fixes needs backport to 3.13 bugs and security fixes labels Jan 22, 2025
@hugovk hugovk merged commit 298dda5 into python:main Jan 22, 2025
62 checks passed
@hugovk hugovk deleted the 3.14-ci-colour branch January 22, 2025 21:22
@miss-islington-app
Copy link

Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 22, 2025
(cherry picked from commit 298dda5)

Co-authored-by: Hugo van Kemenade <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Jan 22, 2025

GH-129198 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jan 22, 2025
@miss-islington-app
Copy link

Sorry, @hugovk, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 298dda57709c45cbcb44831e0d682dc071af5293 3.12

hugovk added a commit to hugovk/cpython that referenced this pull request Jan 22, 2025
(cherry picked from commit 298dda5)

Co-authored-by: Hugo van Kemenade <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Jan 22, 2025

GH-129199 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Jan 22, 2025
hugovk added a commit that referenced this pull request Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants