diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8ec9391d..d66a5458 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,29 +3,22 @@ on: [push, pull_request] permissions: contents: read # to fetch code (actions/checkout) jobs: - tox-lint: + lint: + name: tox-${{ matrix.toxenv }} runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + toxenv: [lint, docs-lint, pycodestyle] + python-version: [ "3.10" ] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - run: pip install --upgrade pip - - run: pip install tox - - run: tox -e lint - - tox-docs-lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - run: pip install --upgrade pip - - run: pip install tox - - run: tox -e docs-lint - - tox-pycodestyle: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - run: pip install --upgrade pip - - run: pip install tox - - run: tox -e pycodestyle + - uses: actions/checkout@v3 + - name: Using Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + python -m pip install tox + - run: tox -e ${{ matrix.toxenv }} diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 8edaaa6a..0dc9bc72 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -4,18 +4,21 @@ permissions: contents: read # to fetch code (actions/checkout) jobs: tox: + name: ${{ matrix.os }} / ${{ matrix.python-version }} + runs-on: ${{ matrix.os }} strategy: fail-fast: false - matrix: # All OSes pass except Windows because tests need Unix-only fcntl, grp, pwd, etc. - os: [ubuntu-latest] # [macos-latest, ubuntu-latest, windows-latest] - python: ['3.10'] # ['3.6', '3.7', '3.8', '3.9', '3.10', 'pypy-3.7'] - runs-on: ${{ matrix.os }} + matrix: + os: [ubuntu-latest, macos-latest] # All OSes pass except Windows because tests need Unix-only fcntl, grp, pwd, etc. + python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "pypy-3.7", "pypy-3.8" ] steps: - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - name: Using Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python }} - - run: pip install --upgrade pip - - run: pip install tox - - run: pip install -e . + python-version: ${{ matrix.python-version }} + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + python -m pip install tox - run: tox -e py diff --git a/tox.ini b/tox.ini index 196bac39..64f58d66 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,10 @@ [tox] -envlist = py35, py36, py37, py38, py39, py310, pypy3, lint, docs-lint, pycodestyle -skipsdist = True +envlist = py{37,38,39,310,311,py3}, lint, docs-lint, pycodestyle +skipsdist = false +; Can't set skipsdist and use_develop in tox v4 to true due to https://github.com/tox-dev/tox/issues/2730 [testenv] -usedevelop = True +use_develop = true commands = pytest --cov=gunicorn {posargs} deps = -rrequirements_test.txt @@ -25,10 +26,10 @@ commands = tests/test_util.py \ tests/test_valid_requests.py deps = - pylint + pylint<2.7 [testenv:docs-lint] -whitelist_externals = +allowlist_externals = rst-lint bash grep