Skip to content

Commit

Permalink
(🎁) canwecolor🚀 (#14051)
Browse files Browse the repository at this point in the history
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 <kotlinisland@users.noreply.github.com>
  • Loading branch information
KotlinIsland and KotlinIsland authored Dec 7, 2022
1 parent 7da2abf commit 695ea30
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@ jobs:
name: ${{ matrix.name }}
env:
TOX_SKIP_MISSING_INTERPRETERS: False
# Rich (pip)
FORCE_COLOR: 1
# Tox
PY_COLORS: 1
# Mypy (see https://github.com/python/mypy/issues/7771)
TERM: xterm-color
MYPY_FORCE_COLOR: 1
MYPY_FORCE_TERMINAL_WIDTH: 200
# Pytest
PYTEST_ADDOPTS: --color=yes
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
minversion = 3.8.0
skip_missing_interpreters = {env:TOX_SKIP_MISSING_INTERPRETERS:True}
envlist =
py36,
py37,
py38,
py39,
Expand All @@ -14,7 +13,7 @@ isolated_build = true

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

Expand All @@ -27,6 +26,7 @@ commands =

[testenv:type]
description = type check ourselves
passenv = TERM MYPY_FORCE_COLOR MYPY_FORCE_TERMINAL_WIDTH
commands =
python -m mypy --config-file mypy_self_check.ini -p mypy -p mypyc
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
Expand Down

0 comments on commit 695ea30

Please sign in to comment.