Simplify build: drop tox

This commit is contained in:
Arjan Molenaar 2022-12-21 21:46:30 +01:00
parent 4b4f0743cf
commit 95e4882616
No known key found for this signature in database
GPG Key ID: BF977B918996CB13
2 changed files with 8 additions and 47 deletions

View File

@ -50,23 +50,21 @@ jobs:
uses: actions/setup-python@v4.3.1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Install Poetry
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions coverage[toml]
- name: Test with tox
run: tox
pip install poetry==$POETRY_VERSION
poetry config virtualenvs.in-project true
- name: Install dependencies
run: poetry install --no-interaction
- name: Test
run: poetry run pytest --cov=generic
- name: Code Climate Coverage Action
uses: paambaati/codeclimate-action@v3.2.0
env:
CC_TEST_REPORTER_ID: f9441442730130d385df69241a779ac3b663756ed21881179826e3fab7e01924
with:
coverageCommand: coverage xml
- name: Install Poetry (release only)
if: github.event_name == 'release' && matrix.python-version == '3.11'
run: |
python -m pip install --upgrade pip
pip install poetry==$POETRY_VERSION
coverageCommand: poetry run coverage xml
- name: Build (release only)
if: github.event_name == 'release' && matrix.python-version == '3.11'
run: poetry build

View File

@ -36,47 +36,10 @@ furo = { version = "^2022", optional = true }
[tool.poetry.dev-dependencies]
pytest = "^7.2"
pytest-cov = "^4.0"
tox = "^4.0"
[tool.poetry.extras]
docs = [ "sphinx", "furo" ]
[tool.tox]
legacy_tox_ini = """
[tox]
isolated_build = true
envlist = clean, py38, py39, py310, py311, report
[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
[testenv]
commands =
pytest --cov --cov-append --cov-report=term-missing {posargs}
deps =
pytest
pytest-cov
depends =
{py38,py39,py310,py311}: clean
report: py38,py39,py310,py311
[testenv:report]
deps = coverage[toml]
skip_install = true
commands =
coverage report
coverage html
[testenv:clean]
deps = coverage[toml]
skip_install = true
commands = coverage erase
"""
[tool.pytest.ini_options]
testpaths = [
"tests",