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

Make Pytest log in color in Github Action #1412

Merged
merged 3 commits into from
Jul 31, 2024

Conversation

eitanturok
Copy link
Contributor

Currently, running pytest locally generates logs in color. But in Github Actions (GA), the logs are only in white. And it does not look so nice. Adding the flag

 --color=yes

causes pytest to log in color and makes things look nice again. This improves visibility and makes it easier on the eyes to see when tests fail/succeed.

I tested this flag on my fork of MegaBlocks but it should be the same here.

Without:
Here is a GA without the --color=yes flag:

without_color

With:
Here is a GA with the --color=yes flag:

with_color

@eitanturok eitanturok requested a review from a team as a code owner July 30, 2024 19:11
@eitanturok eitanturok requested a review from dakinggg July 30, 2024 19:11
@eitanturok eitanturok merged commit 461a402 into mosaicml:main Jul 31, 2024
9 checks passed
@eitanturok eitanturok deleted the color-tests branch July 31, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants