Skip to content

Commit

Permalink
Switch to hatch-test env (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep authored Sep 13, 2024
1 parent 74956e1 commit e9406f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ jobs:
with:
fetch-depth: 0
filter: blob:none
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: dependencies
run: |
pip install --upgrade pip wheel
pip install .[test,typehints]
pip install .[test,typehints] coverage-rich 'anyconfig[toml] >=0.14'
- name: tests
run: coverage run -m pytest --verbose --color=yes
- name: show coverage
run: coverage-rich report
- name: upload coverage
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: c66a2830-d3c7-4ae7-a230-21aef89dcf65
13 changes: 1 addition & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ dev = ['pre-commit']
test = [
'pytest',
'coverage',
'coverage-rich',
'anyconfig[toml] >=0.14', # coverage-rich uses anyconfig
'legacy-api-wrap',
'defusedxml', # sphinx[test] would also pull in cython
]
Expand Down Expand Up @@ -100,17 +98,8 @@ features = ['doc']
[tool.hatch.envs.docs.scripts]
build = 'sphinx-build -M html docs docs/_build'

[[tool.hatch.envs.test.matrix]]
python = ['3.9', '3.10', '3.11', '3.12']
[tool.hatch.envs.test]
[tool.hatch.envs.hatch-test]
features = ['test', 'typehints']
[tool.hatch.envs.test.scripts]
run = 'pytest -vv {args}'
cov = [
'coverage run -m pytest -vv {args}',
'coverage xml',
'coverage-rich report',
]

[tool.pytest.ini_options]
addopts = [
Expand Down

0 comments on commit e9406f0

Please sign in to comment.