Skip to content

Commit

Permalink
🎨 Make the GHA log is clean and colorized
Browse files Browse the repository at this point in the history
This patch sets up root-level environment variables shared by all the
workflow jobs. They include:

* Disabling undesired `pip`'s warnings/suggestions
* Requesting the executed apps color their output unconditionally
* Letting `tox` pass those requests to underlying/wrapped programs
  • Loading branch information
webknjaz committed Oct 1, 2022
1 parent b241226 commit e22ae08
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@ name: tests

on: [push, pull_request]

env:
FORCE_COLOR: 1 # Request colored output from CLI tools supporting it
MYPY_FORCE_COLOR: 1 # MyPy's color enforcement
PIP_DISABLE_PIP_VERSION_CHECK: 1
PIP_NO_PYTHON_VERSION_WARNING: 1
PIP_NO_WARN_SCRIPT_LOCATION: 1
PY_COLORS: 1 # Recognized by the `py` package, dependency of `pytest`
TOX_PARALLEL_NO_SPINNER: 1
TOX_TESTENV_PASSENV: >- # Make tox-wrapped tools see color requests
FORCE_COLOR
MYPY_FORCE_COLOR
NO_COLOR
PY_COLORS
PYTEST_THEME
PYTEST_THEME_MODE
jobs:
test:
strategy:
Expand Down

0 comments on commit e22ae08

Please sign in to comment.