Skip to content

Commit 35e5411

Browse files
committed
switch to hatch test subcommand
1 parent 9684480 commit 35e5411

File tree

2 files changed

+10
-20
lines changed

2 files changed

+10
-20
lines changed

.github/workflows/Tests.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ jobs:
1919
3.12
2020
2121
- name: Install Hatch
22-
run: python -m pip install hatch
22+
run: python -m pip install "hatch >= 1.10.0"
2323

2424
- name: Perform release check
2525
run: hatch run lint:release
2626

2727
- name: Run tests
28-
run: hatch run test:cov --verbose
28+
run: hatch test --all --cover-quiet --verbose
2929

3030
- name: Generate report
31-
run: hatch env run -e test.py3.12 coverage xml
31+
run: hatch env run -e hatch-test.py3.12 coverage xml
3232

3333
- name: Upload coverage
3434
uses: codecov/codecov-action@v5

pyproject.toml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,10 @@ Bugtracker = "https://github.com/Deric-W/lambda_calculus/issues"
3131
requires = ["hatchling"]
3232
build-backend = "hatchling.build"
3333

34-
[tool.hatch.envs.test]
35-
dependencies = [
36-
"coverage[toml] == 7.*"
37-
]
38-
39-
[tool.hatch.envs.test.scripts]
40-
test = "python -m unittest discover {args}"
41-
cov-run = "coverage run -m unittest discover {args}"
42-
cov-report = [
43-
"- coverage combine",
44-
"coverage report"
45-
]
46-
cov = [
47-
"cov-run",
48-
"cov-report"
49-
]
34+
[tool.hatch.envs.hatch-test]
35+
installer = "pip"
5036

51-
[[tool.hatch.envs.test.matrix]]
37+
[[tool.hatch.envs.hatch-test.matrix]]
5238
python = ["3.10", "3.11", "3.12"]
5339

5440
[tool.hatch.envs.lint]
@@ -82,6 +68,10 @@ build = "sphinx-build {args} docs docs/_build"
8268
[tool.hatch.build.targets.sdist]
8369
exclude = ["/.github"]
8470

71+
[tool.pytest.ini_options]
72+
minversion = "6.0"
73+
python_files = "test_*.py *_test.py __init__.py"
74+
8575
[tool.mypy]
8676
disallow_any_unimported = true
8777
disallow_any_generics = true

0 commit comments

Comments
 (0)