From e9406f0c69a15a710dc5c9a97f0f1a1b7be953d1 Mon Sep 17 00:00:00 2001 From: "Philipp A." Date: Fri, 13 Sep 2024 13:11:59 +0200 Subject: [PATCH] Switch to hatch-test env (#171) --- .github/workflows/ci.yml | 6 +++--- pyproject.toml | 13 +------------ 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80b33b0..f46b112 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/pyproject.toml b/pyproject.toml index a3c92cc..b5c568c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 ] @@ -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 = [