Skip to content

Commit

Permalink
GHA pretty env (#67)
Browse files Browse the repository at this point in the history
* 🎨 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 <wk@sydorenko.org.ua>
  • Loading branch information
jaraco and webknjaz authored Oct 9, 2022
1 parent b241226 commit e95c54f
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,36 @@ name: tests

on: [push, pull_request]

env:
# Environment variables to support color support (jaraco/skeleton#66):
# Request colored output from CLI tools supporting it. Different tools
# interpret the value differently. For some, just being set is sufficient.
# For others, it must be a non-zero integer. For yet others, being set
# to a non-empty value is sufficient.
FORCE_COLOR: -106
# MyPy's color enforcement (must be a non-zero number)
MYPY_FORCE_COLOR: -42
# Recognized by the `py` package, dependency of `pytest` (must be "1")
PY_COLORS: 1
# Make tox-wrapped tools see color requests
TOX_TESTENV_PASSENV: >-
FORCE_COLOR
MYPY_FORCE_COLOR
NO_COLOR
PY_COLORS
PYTEST_THEME
PYTEST_THEME_MODE
# Suppress noisy pip warnings
PIP_DISABLE_PIP_VERSION_CHECK: 'true'
PIP_NO_PYTHON_VERSION_WARNING: 'true'
PIP_NO_WARN_SCRIPT_LOCATION: 'true'

# Disable the spinner, noise in GHA; TODO(webknjaz): Fix this upstream
# Must be "1".
TOX_PARALLEL_NO_SPINNER: 1


jobs:
test:
strategy:
Expand Down

0 comments on commit e95c54f

Please sign in to comment.