Skip to content

Commit 96f175b

Browse files
committed
canwecolor🚀
1 parent 7da2abf commit 96f175b

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

‎.github/workflows/test.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,16 @@ jobs:
102102
name: ${{ matrix.name }}
103103
env:
104104
TOX_SKIP_MISSING_INTERPRETERS: False
105+
# Rich (pip)
106+
FORCE_COLOR: 1
107+
# Tox
108+
PY_COLORS: 1
109+
# Mypy (see https://github.com/python/mypy/issues/7771)
110+
TERM: xterm-color
111+
MYPY_FORCE_COLOR: 1
112+
MYPY_FORCE_TERMINAL_WIDTH: 200
113+
# Pytest
114+
PYTEST_ADDOPTS: --color=yes
105115
steps:
106116
- uses: actions/checkout@v3
107117
- uses: actions/setup-python@v4

‎tox.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ isolated_build = true
1414

1515
[testenv]
1616
description = run the test driver with {basepython}
17-
passenv = PYTEST_XDIST_WORKER_COUNT PROGRAMDATA PROGRAMFILES(X86)
17+
passenv = PYTEST_XDIST_WORKER_COUNT PROGRAMDATA PROGRAMFILES(X86) FORCE_COLOR PYTEST_ADDOPTS
1818
deps = -rtest-requirements.txt
1919
commands = python -m pytest {posargs}
2020

@@ -27,6 +27,7 @@ commands =
2727

2828
[testenv:type]
2929
description = type check ourselves
30+
passenv = TERM MYPY_FORCE_COLOR MYPY_FORCE_TERMINAL_WIDTH
3031
commands =
3132
python -m mypy --config-file mypy_self_check.ini -p mypy -p mypyc
3233
python -m mypy --config-file mypy_self_check.ini misc --exclude misc/fix_annotate.py --exclude misc/async_matrix.py --exclude misc/sync-typeshed.py

0 commit comments

Comments
 (0)