Commit 05b29834 authored by Nicolas Chauvat's avatar Nicolas Chauvat
Browse files

add black and mypy to tests

parent 2c479b65d215
Pipeline #29942 failed with stage
in 4 minutes and 59 seconds
---
image: python:3.7
stages:
- tests
- after-tests
before_script:
- pip install tox
check-manifest:
stage: tests
script: tox -e check-manifest
flake8:
stage: tests
script: tox -e flake8
py3:
stage: tests
script: tox -e py3
artifacts:
paths:
- py3-deprecated-warnings.json
black:
stage: tests
script: tox -e black
mypy:
stage: tests
script: tox -e mypy
dist
.tox/
cubicweb_intranet.egg-info/
test/data/database
[tox]
envlist = py3,flake8,check-manifest
envlist = py3,flake8,check-manifest,black
[testenv]
deps =
pytest
-rdev-requirements.txt
commands =
{envpython} -m pytest {posargs}
{envpython} -m pytest {posargs:test}
[pytest]
python_files = *test_*.py
......@@ -14,10 +14,11 @@ testpaths = test
addopts = -r fEs
[testenv:flake8]
basepython = python3
skip_install = true
skipsdist = true
deps =
flake8
flake8 >= 3.6
commands =
{envpython} -m flake8
......@@ -31,4 +32,24 @@ skipsdist = true
deps =
check-manifest
commands =
{envpython} -m check_manifest
{envpython} -m check_manifest {toxinidir}
[testenv:mypy]
deps =
mypy >= 0.761
commands = mypy --ignore-missing-imports cubicweb_intranet
[testenv:black]
basepython = python3
skip_install = true
deps =
black >= 19.10b0
commands = black --check .
[testenv:black-run]
basepython = python3
skip_install = true
deps =
black >= 19.10b0
commands = black .
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment