diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ac6825..90b84e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,3 +1,4 @@ +# Uses https://github.com/ymyzk/tox-gh-actions name: ci on: [push, pull_request] @@ -8,7 +9,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", '3.11.0-rc - 3.11'] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11.0-rc - 3.11"] os: [ubuntu-latest] @@ -20,15 +21,14 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Update pip, setuptools + wheel + - name: Update pip run: | - python -m pip install --upgrade pip setuptools wheel + python -m pip install --upgrade pip setuptools - - name: Install flake8-bugbear w/dev extra install + - name: Install tox and tox-gh-actions run: | - python -m pip install .[dev] + python -m pip install tox tox-gh-actions - - name: Run Unittests + - name: Run tox run: | - coverage run tests/test_bugbear.py - coverage report -m + tox diff --git a/pyproject.toml b/pyproject.toml index d31ae92..dcabd39 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,6 +47,7 @@ Homepage = "https://github.com/PyCQA/flake8-bugbear" [project.optional-dependencies] dev = [ + "tox", "coverage", "hypothesis", "hypothesmith>=0.2", diff --git a/tox.ini b/tox.ini index 639bf30..2034dd9 100644 --- a/tox.ini +++ b/tox.ini @@ -3,6 +3,14 @@ # default environments to run without `-e` envlist = py37, py38, py39, py310, py311 +[gh-actions] +python = + 3.7: py37 + 3.8: py38 + 3.9: py39 + 3.10: py310 + "3.11.0-rc - 3.11": py311 + [testenv:{py37, py38, py39, py310, py311}] description = Run coverage deps = @@ -11,3 +19,4 @@ deps = hypothesmith commands = coverage run tests/test_bugbear.py {posargs} + coverage report -m