diff --git a/.github/workflows/python-relattrs-ci.yml b/.github/workflows/python-relattrs-ci.yml index 08a5edf..170f5d3 100644 --- a/.github/workflows/python-relattrs-ci.yml +++ b/.github/workflows/python-relattrs-ci.yml @@ -20,6 +20,7 @@ jobs: steps: - uses: actions/checkout@v5 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: @@ -30,9 +31,8 @@ jobs: python -m pip install --upgrade pip pip install .[dev] - - name: Test with pytest and coverage - run: | - pytest --cov --cov-report=xml + - name: Run tox + run: tox -q -e py$(echo ${{ matrix.python-version }} | tr -d .) - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v5 diff --git a/.gitignore b/.gitignore index 5fc5d5f..6f5dda1 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,10 @@ # tox test environment /.tox +# coverage reports +coverage.xml +.coverage + # Setuptools distribution folder /dist diff --git a/pyproject.toml b/pyproject.toml index 340f8d3..bb53bef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,14 +53,13 @@ pythonpath = [".", "relattrs"] filterwarnings = ["ignore::DeprecationWarning"] [tool.tox] -legacy_tox_ini = """ -[tox] -env_list = py{314,313,312,311,310,39,38} +envlist = ["py38", "py39", "py310", "py311", "py312", "py313", "py314"] -[testenv] -deps = pytest -commands = pytest -q -""" +[tool.tox.env_run_base] +deps = ["pytest", "pytest-cov"] +commands = [ + ["pytest", "-q", "--cov", "--cov-report=xml"] +] [tool.ruff] line-length = 88