Skip to content

Commit

Permalink
Merge pull request #12 from Deric-W/hatch-test
Browse files Browse the repository at this point in the history
use hatch test
  • Loading branch information
Deric-W authored Nov 20, 2024
2 parents 9684480 + 71d8763 commit 952304b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 21 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/Tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,20 @@ jobs:
3.10
3.11
3.12
3.13
cache: pip

- name: Install Hatch
run: python -m pip install hatch
run: python -m pip install "hatch >= 1.10.0"

- name: Perform release check
run: hatch run lint:release

- name: Run tests
run: hatch run test:cov --verbose
run: hatch test --all --cover-quiet --verbose

- name: Generate report
run: hatch env run -e test.py3.12 coverage xml
run: hatch env run -e hatch-test.py3.12 coverage xml

- name: Upload coverage
uses: codecov/codecov-action@v5
Expand Down
26 changes: 8 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,11 @@ Bugtracker = "https://github.com/Deric-W/lambda_calculus/issues"
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.envs.test]
dependencies = [
"coverage[toml] == 7.*"
]

[tool.hatch.envs.test.scripts]
test = "python -m unittest discover {args}"
cov-run = "coverage run -m unittest discover {args}"
cov-report = [
"- coverage combine",
"coverage report"
]
cov = [
"cov-run",
"cov-report"
]
[tool.hatch.envs.hatch-test]
installer = "pip"

[[tool.hatch.envs.test.matrix]]
python = ["3.10", "3.11", "3.12"]
[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.10", "3.11", "3.12", "3.13"]

[tool.hatch.envs.lint]
dependencies = [
Expand Down Expand Up @@ -82,6 +68,10 @@ build = "sphinx-build {args} docs docs/_build"
[tool.hatch.build.targets.sdist]
exclude = ["/.github"]

[tool.pytest.ini_options]
minversion = "6.0"
python_files = "test_*.py *_test.py __init__.py"

[tool.mypy]
disallow_any_unimported = true
disallow_any_generics = true
Expand Down

0 comments on commit 952304b

Please sign in to comment.