Browse Source

enrich tox.ini from gui

Fred Lefévère-Laoide 1 year ago
parent
commit
7b703e93c0
1 changed files with 60 additions and 2 deletions
  1. 60 2
      tox.ini

+ 60 - 2
tox.ini

@@ -1,7 +1,7 @@
 [tox]
 skipsdist = true
 isolated_build = true
-envlist = clean, lint, without-pyodbc
+envlist = clean, lint, linux, windows, macos, report, without-pyodbc
 
 [pytest]
 filterwarnings =
@@ -9,10 +9,68 @@ filterwarnings =
 
 [testenv]
 allowlist_externals = pytest
-deps = pipenv==2023.7.23
+deps =
+    pipenv==2023.7.23
+    mypy
+
+[testenv:lint]
+platform = linux
+allowlist_externals =
+    isort
+    black
+    flake8
+deps =
+    isort
+    black
+    flake8
+commands =
+    isort src --check
+    black src tests --check
+    flake8 src tests
+
+[testenv:linux]
+platform = linux
+commands =
+    pipenv install --dev
+    pipenv run ipython kernel install --name "python3" --user
+    pipenv run playwright install chromium --with-deps
+    pipenv run mypy --config-file mypy.ini src
+    pipenv run pytest -s --cov=src --cov-append --cov-report=xml --cov-report term-missing tests
+
+[testenv:windows]
+platform = win32
+commands =
+    pipenv install --dev
+    pipenv run ipython kernel install --name "python3" --user
+    pipenv run playwright install chromium --with-deps
+    pipenv run pytest -s tests
+
+[testenv:macos]
+platform = darwin
+commands =
+    pipenv install --dev
+    pipenv run ipython kernel install --name "python3" --user
+    pipenv run playwright install chromium --with-deps
+    pipenv run pytest -s tests
+
+[testenv:report]
+depends = linux
+platform = linux
+deps = coverage
+skip_install = true
+commands =
+    coverage report
+    coverage html
+
+[testenv:clean]
+platform = linux
+deps = coverage
+skip_install = true
+commands = coverage erase
 
 [testenv:tests]
 commands =
     pipenv install --dev
     pipenv run pip freeze
     pytest tests
+