Skip to content

Commit 952304b

Browse files
authored
Merge pull request #12 from Deric-W/hatch-test
use hatch test
2 parents 9684480 + 71d8763 commit 952304b

File tree

2 files changed

+13
-21
lines changed

2 files changed

+13
-21
lines changed

.github/workflows/Tests.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,20 @@ jobs:
1717
3.10
1818
3.11
1919
3.12
20+
3.13
21+
cache: pip
2022

2123
- name: Install Hatch
22-
run: python -m pip install hatch
24+
run: python -m pip install "hatch >= 1.10.0"
2325

2426
- name: Perform release check
2527
run: hatch run lint:release
2628

2729
- name: Run tests
28-
run: hatch run test:cov --verbose
30+
run: hatch test --all --cover-quiet --verbose
2931

3032
- name: Generate report
31-
run: hatch env run -e test.py3.12 coverage xml
33+
run: hatch env run -e hatch-test.py3.12 coverage xml
3234

3335
- name: Upload coverage
3436
uses: codecov/codecov-action@v5

pyproject.toml

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,11 @@ 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]]
52-
python = ["3.10", "3.11", "3.12"]
37+
[[tool.hatch.envs.hatch-test.matrix]]
38+
python = ["3.10", "3.11", "3.12", "3.13"]
5339

5440
[tool.hatch.envs.lint]
5541
dependencies = [
@@ -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)