diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9fa5e9d..3a125c0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -75,12 +75,12 @@ local development. Now you can make your changes locally. 5. When you\'re done making changes, check that your changes pass - flake8 and the tests, including testing other Python versions with - tox: + lint and the tests. $ pip install hatch $ make lint - $ make test + $ make test # for python in your env + $ make test-all # for all supported python versions 6. Commit your changes and push your branch to GitHub: diff --git a/Makefile b/Makefile index 3939f52..af87b65 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,9 @@ lint: test: hatch test +test-all: + hatch run test:cov + release: clean hatch build hatch publish diff --git a/pyproject.toml b/pyproject.toml index ced3267..1546d90 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,18 +37,19 @@ Source = "https://github.com/onjin/runenv" [tool.hatch.version] path = "runenv/__about__.py" -[tool.hatch.envs.default] +[tool.hatch.envs.test] dependencies = [ + "coverage[toml]", "pytest", "pytest-cov", ] -[tool.hatch.envs.default.scripts] -cov = "pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=runenv --cov=tests {args}" -no-cov = "cov --no-cov {args}" +[tool.hatch.envs.test.scripts] +cov = 'pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=runenv --cov=tests' -[[tool.hatch.envs.all.matrix]] +[[tool.hatch.envs.test.matrix]] python = ["3.8", "3.9", "3.10", "3.11", "3.12"] + [tool.coverage.run] branch = true parallel = true diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 96a5b6e..0000000 --- a/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py26, py27, py36, py37, py38, py39 - -[testenv] -setenv = - PYTHONPATH = {toxinidir}:{toxinidir}/runenv -commands = python setup.py test -deps = - -r{toxinidir}/requirements.txt