Skip to content

Commit

Permalink
tests: fix hatch testing env matrix name and scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
onjin committed Oct 3, 2024
1 parent 1baba5e commit 4bb4403
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 17 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ lint:
test:
hatch test

test-all:
hatch run test:cov

release: clean
hatch build
hatch publish
Expand Down
11 changes: 6 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 0 additions & 9 deletions tox.ini

This file was deleted.

0 comments on commit 4bb4403

Please sign in to comment.