diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 46a16e8cf..fdc0e9666 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -14,7 +14,6 @@ on: - "Makefile" - "MANIFEST.in" - "pyproject.toml" - - "tox.ini" pull_request: branches: - dev @@ -27,7 +26,6 @@ on: - "Makefile" - "MANIFEST.in" - "pyproject.toml" - - "tox.ini" jobs: unittest: diff --git a/pyproject.toml b/pyproject.toml index cfe4554e4..4c554beec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -318,3 +318,18 @@ select = [ # Some rules are ignored for now; we can consider enabling them in the future. # S101 is use of assert statement, should be an easy fix. extend-ignore = ["E402", "E501", "E722", "S101", "S202", "S301", "S310"] + +[tool.tox] +envlist = ["py39", "py310", "py311", "py312", "py313", "py3", "flake8"] +skip_missing_interpreters = true + +[tool.tox.testenv] +setenv = { PYTHONPATH = "{toxinidir}:{toxinidir}/pythainlp" } +changedir = "tests" +commands = ["discover"] +deps = ["discover"] + +[tool.tox.envs.flake8] +basepython = "python" +deps = ["flake8"] +commands = ["flake8 pythainlp"] diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 59ee3c9dd..000000000 --- a/tox.ini +++ /dev/null @@ -1,19 +0,0 @@ -[tox] -envlist=py{39,310,311,312,313,py3},flake8 -skip_missing_interpreters = true - -[testenv] -setenv = PYTHONPATH = {toxinidir}:{toxinidir}/pythainlp -#commands = python3 -m unittest discover -changedir = tests -commands = discover -deps = discover -; If you want to install the package with dependencies for testing: -; deps = -; .[compact] -; discover - -[testenv:flake8] -basepython = python -deps = flake8 -commands = flake8 pythainlp