diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 610db06..7146688 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,18 +24,17 @@ jobs: allow-prereleases: true cache: pip cache-dependency-path: | + .github/workflows/ci.yml dev-requirements.txt requirements.txt - name: Install dependencies run: | - python3 -m pip install -U -r dev-requirements.txt + python3 -m pip install -U coverage tox - name: Tests run: | - python3 -m coverage run -m pytest - python3 -m coverage report - python3 -m coverage xml + tox -e py - name: Upload coverage uses: codecov/codecov-action@v3 diff --git a/pytest.ini b/pytest.ini index 932b2fb..ee3bbae 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,5 +1,12 @@ [pytest] -addopts = --strict-config --strict-markers +addopts = + --strict-config + --strict-markers + --cov blurb_it + --cov tests + --cov-report html + --cov-report term + --cov-report xml xfail_strict = True asyncio_mode = auto filterwarnings = error diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..bb4c614 --- /dev/null +++ b/tox.ini @@ -0,0 +1,13 @@ +[tox] +requires = + tox>=4.2 +env_list = + py{312, 311, 310, 39, 38} + +[testenv] +pass_env = + FORCE_COLOR +commands_pre = + {envpython} -m pip install -U -r dev-requirements.txt +commands = + {envpython} -m pytest {posargs}