GA workflows cleanup

Working Matrix for both lint/tox
Fixing tox v4 issues
Adjust pylint to working version
This commit is contained in:
samypr100 2023-01-22 13:02:59 -05:00
parent 30baeebf33
commit f5d73aa73d
No known key found for this signature in database
GPG Key ID: E1717AA77760955D
3 changed files with 35 additions and 38 deletions

View File

@ -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 }}

View File

@ -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

11
tox.ini
View File

@ -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