Skip to content

Commit 695ea30

Browse files
authored
(🎁) canwecolor🚀 (#14051)
Last time i checked it wasn't the 1960's. So I think the CI could be colorized. Configured pytest, tox, mypy(#7771) and pip¹ (I already already colorized black and isort when I initially added them) 1: Pip doesn't work yet pypa/pip#10909, so this is just a placedholder for when it (hopefully) soon will. Co-authored-by: KotlinIsland <[email protected]>
1 parent 7da2abf commit 695ea30

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
minversion = 3.8.0
33
skip_missing_interpreters = {env:TOX_SKIP_MISSING_INTERPRETERS:True}
44
envlist =
5-
py36,
65
py37,
76
py38,
87
py39,
@@ -14,7 +13,7 @@ isolated_build = true
1413

1514
[testenv]
1615
description = run the test driver with {basepython}
17-
passenv = PYTEST_XDIST_WORKER_COUNT PROGRAMDATA PROGRAMFILES(X86)
16+
passenv = PYTEST_XDIST_WORKER_COUNT PROGRAMDATA PROGRAMFILES(X86) PYTEST_ADDOPTS
1817
deps = -rtest-requirements.txt
1918
commands = python -m pytest {posargs}
2019

@@ -27,6 +26,7 @@ commands =
2726

2827
[testenv:type]
2928
description = type check ourselves
29+
passenv = TERM MYPY_FORCE_COLOR MYPY_FORCE_TERMINAL_WIDTH
3030
commands =
3131
python -m mypy --config-file mypy_self_check.ini -p mypy -p mypyc
3232
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)