Skip to content

Commit

Permalink
Merge pull request #10 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 f830849 + 842fa31 commit 36bd370
Show file tree
Hide file tree
Showing 2 changed files with 9 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
22 changes: 4 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,11 @@ lambda-repl = "lambda_repl.main:main_cli"
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

0 comments on commit 36bd370

Please sign in to comment.