Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.
This repository was 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

Description

@darrenburns

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions