Skip to content

Commit e95c54f

Browse files
jaracowebknjaz
andauthored
GHA pretty env (#67)
* 🎨 Make the GHA log is clean and colorized 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 * Reformat without end of line comments. Group into sections. * Avoid numerics for booleans where possible. Choose arbitrary numeric where any numeric is accepted. Co-authored-by: Sviatoslav Sydorenko <[email protected]>
1 parent b241226 commit e95c54f

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/main.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,36 @@ name: tests
22

33
on: [push, pull_request]
44

5+
env:
6+
# Environment variables to support color support (jaraco/skeleton#66):
7+
# Request colored output from CLI tools supporting it. Different tools
8+
# interpret the value differently. For some, just being set is sufficient.
9+
# For others, it must be a non-zero integer. For yet others, being set
10+
# to a non-empty value is sufficient.
11+
FORCE_COLOR: -106
12+
# MyPy's color enforcement (must be a non-zero number)
13+
MYPY_FORCE_COLOR: -42
14+
# Recognized by the `py` package, dependency of `pytest` (must be "1")
15+
PY_COLORS: 1
16+
# Make tox-wrapped tools see color requests
17+
TOX_TESTENV_PASSENV: >-
18+
FORCE_COLOR
19+
MYPY_FORCE_COLOR
20+
NO_COLOR
21+
PY_COLORS
22+
PYTEST_THEME
23+
PYTEST_THEME_MODE
24+
25+
# Suppress noisy pip warnings
26+
PIP_DISABLE_PIP_VERSION_CHECK: 'true'
27+
PIP_NO_PYTHON_VERSION_WARNING: 'true'
28+
PIP_NO_WARN_SCRIPT_LOCATION: 'true'
29+
30+
# Disable the spinner, noise in GHA; TODO(webknjaz): Fix this upstream
31+
# Must be "1".
32+
TOX_PARALLEL_NO_SPINNER: 1
33+
34+
535
jobs:
636
test:
737
strategy:

0 commit comments

Comments
 (0)