Skip to content
Snippets Groups Projects
Verified Commit 37655238 authored by Aleksolotl's avatar Aleksolotl Committed by Jonathan Weth
Browse files

Update tox.ini

parent 36d20af8
No related branches found
No related tags found
1 merge request!316Update tox.ini
...@@ -4,11 +4,12 @@ skip_missing_interpreters = true ...@@ -4,11 +4,12 @@ skip_missing_interpreters = true
envlist = py39,py310,py311 envlist = py39,py310,py311
[testenv] [testenv]
allowlist_externals = poetry allowlist_externals =
poetry
yarnpkg
skip_install = true skip_install = true
envdir = {toxworkdir}/globalenv
commands_pre = commands_pre =
poetry install poetry install --all-extras
poetry run aleksis-admin vite build poetry run aleksis-admin vite build
poetry run aleksis-admin collectstatic --no-input poetry run aleksis-admin collectstatic --no-input
commands = commands =
...@@ -22,14 +23,17 @@ setenv = ...@@ -22,14 +23,17 @@ setenv =
TEST_HOST = {env:TEST_HOST:172.17.0.1} TEST_HOST = {env:TEST_HOST:172.17.0.1}
[testenv:lint] [testenv:lint]
commands_pre =
poetry install --only=dev
yarnpkg
commands = commands =
poetry run black --check --diff aleksis/ poetry run ruff check {posargs} aleksis/
poetry run isort -c --diff --stdout aleksis/ yarnpkg run prettier {posargs} --check .
poetry run flake8 {posargs} aleksis/ yarnpkg run eslint aleksis/**/*/frontend/**/*.{js,vue}
poetry run sh -c "aleksis-admin yarn run prettier --check --ignore-path={toxinidir}/.prettierignore {toxinidir}"
poetry run sh -c "aleksis-admin yarn run eslint {toxinidir}/aleksis/**/*/frontend/**/*.{js,vue} --config={toxinidir}/.eslintrc.js --resolve-plugins-relative-to=."
[testenv:security] [testenv:security]
commands_pre =
poetry install --all-extras
commands = commands =
poetry show --no-dev poetry show --no-dev
poetry run safety check --full-report poetry run safety check --full-report
...@@ -41,33 +45,25 @@ commands_pre = ...@@ -41,33 +45,25 @@ commands_pre =
commands = poetry build commands = poetry build
[testenv:docs] [testenv:docs]
commands_pre =
poetry install
commands = poetry run make -C docs/ html {posargs} commands = poetry run make -C docs/ html {posargs}
[testenv:reformat] [testenv:reformat]
commands_pre =
poetry install --only=dev
yarnpkg
commands = commands =
poetry run isort aleksis/ poetry run ruff format aleksis/
poetry run black aleksis/ yarnpkg run prettier --write .
poetry run sh -c "aleksis-admin yarn run prettier --write --ignore-path={toxinidir}/.prettierignore {toxinidir}"
[testenv:makemessages] [testenv:makemessages]
commands_pre =
poetry install
commands = commands =
poetry run aleksis-admin makemessages --no-wrap -e html,txt,py,email -i static -l ar -l de_DE -l fr -l nb_NO -l tr_TR -l la -l uk -l ru poetry run aleksis-admin makemessages --no-wrap -e html,txt,py,email -i static -l ar -l de_DE -l fr -l nb_NO -l tr_TR -l la -l uk -l ru
poetry run aleksis-admin makemessages --no-wrap -d djangojs -i **/node_modules -l ar -l de_DE -l fr -l nb_NO -l tr_TR -l la -l uk -l ru poetry run aleksis-admin makemessages --no-wrap -d djangojs -i **/node_modules -l ar -l de_DE -l fr -l nb_NO -l tr_TR -l la -l uk -l ru
[flake8]
max_line_length = 100
exclude = migrations,tests
ignore = BLK100,E203,E231,W503,D100,D101,D102,D103,D104,D105,D106,D107,RST215,RST214,F821,F841,S106,T100,T101,DJ05
[isort]
profile = black
line_length = 100
default_section = THIRDPARTY
known_first_party = aleksis
known_django = django
skip = migrations
sections = FUTURE,STDLIB,DJANGO,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
[pytest] [pytest]
DJANGO_SETTINGS_MODULE = aleksis.core.settings DJANGO_SETTINGS_MODULE = aleksis.core.settings
junit_family = legacy junit_family = legacy
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment