Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Colour output when running on CI platforms that support it #243

Open
darrenburns opened this issue May 30, 2021 · 1 comment · May be fixed by #345
Open

Colour output when running on CI platforms that support it #243

darrenburns opened this issue May 30, 2021 · 1 comment · May be fixed by #345
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@darrenburns
Copy link
Owner

GitHub Actions supports colour terminal output, but Rich disables it when it detects it's not writing to a terminal.

We should check environment variables, and if we're on a CI platform that we know supports colours, force Rich to write them as described here: Textualize/rich#52 (comment)

We can detect that we're running on GitHub Actions by looking at the env var described in here: https://docs.github.com/en/actions/reference/environment-variables#default-environment-variables

We should also allow the user to force colour output by passing a command line flag.

Example of output in our CI pipeline just now:

image

@darrenburns darrenburns added enhancement New feature or request good first issue Good for newcomers labels May 30, 2021
@ImAKappa
Copy link

ImAKappa commented Jul 5, 2022

Hi @darrenburns, I can work on this issue if no one else has.
I'm comfortable with Python and have used ward before, but haven't contributed much to open source projects, so I thought I would try to help with this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@darrenburns @ImAKappa and others