darrenburns / ward

Ward is a modern test framework for Python with a focus on productivity and readability.
https://ward.readthedocs.io
MIT License
1.21k stars 53 forks source link

When running in GitHub Actions, force colors on #345

Open AndydeCleyre opened 2 years ago

AndydeCleyre commented 2 years ago

Fixes #243

Maybe the coloring can be improved from here, this is at least what I see, with this change:

image

codecov[bot] commented 2 years ago

Codecov Report

Base: 84.94% // Head: 84.94% // Increases project coverage by +0.00% :tada:

Coverage data is based on head (1f4a041) compared to base (518a0ec). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #345 +/- ## ======================================= Coverage 84.94% 84.94% ======================================= Files 21 21 Lines 1846 1847 +1 Branches 284 284 ======================================= + Hits 1568 1569 +1 Misses 236 236 Partials 42 42 ``` | [Impacted Files](https://codecov.io/gh/darrenburns/ward/pull/345?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Darren+Burns) | Coverage Δ | | |---|---|---| | [ward/\_terminal.py](https://codecov.io/gh/darrenburns/ward/pull/345/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Darren+Burns#diff-d2FyZC9fdGVybWluYWwucHk=) | `63.02% <100.00%> (+0.07%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Darren+Burns). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Darren+Burns)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

AndydeCleyre commented 2 years ago

I'm having second thoughts about this, as I'm now seeing some tools checking for the environment parameter FORCE_COLOR (set to, e.g. 1). So it should probably be enough to check for FORCE_COLOR here, and let Action authors set that in the action.