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 #3505

Merged
merged 1 commit into from
Jul 31, 2024
Merged

Make Pytest log in color in Github Action #3505

merged 1 commit into from
Jul 31, 2024

Conversation

eitanturok
Copy link
Contributor

@eitanturok eitanturok commented Jul 30, 2024

What does this PR do?

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

What issue(s) does this change relate to?

Before submitting

  • Have you read the contributor guidelines?
  • Is this change a documentation change or typo fix? If so, skip the rest of this checklist.
  • Was this change discussed/approved in a GitHub issue first? It is much more likely to be merged if so.
  • Did you update any related docs and document your change?
  • Did you update any related tests and add any new tests related to your change? (see testing)
  • Did you run the tests locally to make sure they pass?
  • Did you run pre-commit on your change? (see the pre-commit section of prerequisites)

@eitanturok eitanturok requested a review from a team as a code owner July 30, 2024 15:40
Copy link
Contributor

@karan6181 karan6181 left a comment

Choose a reason for hiding this comment

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

LGTM

@karan6181 karan6181 merged commit 722888e into mosaicml:dev Jul 31, 2024
14 checks passed
@eitanturok eitanturok deleted the color-logs-GA branch July 31, 2024 00: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