mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
GA workflows cleanup
Working Matrix for both lint/tox Fixing tox v4 issues Adjust pylint to working version
This commit is contained in:
parent
30baeebf33
commit
f5d73aa73d
41
.github/workflows/lint.yml
vendored
41
.github/workflows/lint.yml
vendored
@ -3,29 +3,22 @@ on: [push, pull_request]
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read # to fetch code (actions/checkout)
|
contents: read # to fetch code (actions/checkout)
|
||||||
jobs:
|
jobs:
|
||||||
tox-lint:
|
lint:
|
||||||
|
name: tox-${{ matrix.toxenv }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
toxenv: [lint, docs-lint, pycodestyle]
|
||||||
|
python-version: [ "3.10" ]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v2
|
- name: Using Python ${{ matrix.python-version }}
|
||||||
- run: pip install --upgrade pip
|
uses: actions/setup-python@v4
|
||||||
- run: pip install tox
|
with:
|
||||||
- run: tox -e lint
|
python-version: ${{ matrix.python-version }}
|
||||||
|
- name: Install Dependencies
|
||||||
tox-docs-lint:
|
run: |
|
||||||
runs-on: ubuntu-latest
|
python -m pip install --upgrade pip
|
||||||
steps:
|
python -m pip install tox
|
||||||
- uses: actions/checkout@v2
|
- run: tox -e ${{ matrix.toxenv }}
|
||||||
- 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
|
|
||||||
|
|||||||
21
.github/workflows/tox.yml
vendored
21
.github/workflows/tox.yml
vendored
@ -4,18 +4,21 @@ permissions:
|
|||||||
contents: read # to fetch code (actions/checkout)
|
contents: read # to fetch code (actions/checkout)
|
||||||
jobs:
|
jobs:
|
||||||
tox:
|
tox:
|
||||||
|
name: ${{ matrix.os }} / ${{ matrix.python-version }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix: # All OSes pass except Windows because tests need Unix-only fcntl, grp, pwd, etc.
|
matrix:
|
||||||
os: [ubuntu-latest] # [macos-latest, ubuntu-latest, windows-latest]
|
os: [ubuntu-latest, macos-latest] # All OSes pass except Windows because tests need Unix-only fcntl, grp, pwd, etc.
|
||||||
python: ['3.10'] # ['3.6', '3.7', '3.8', '3.9', '3.10', 'pypy-3.7']
|
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "pypy-3.7", "pypy-3.8" ]
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v4
|
- name: Using Python ${{ matrix.python-version }}
|
||||||
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- run: pip install --upgrade pip
|
- name: Install Dependencies
|
||||||
- run: pip install tox
|
run: |
|
||||||
- run: pip install -e .
|
python -m pip install --upgrade pip
|
||||||
|
python -m pip install tox
|
||||||
- run: tox -e py
|
- run: tox -e py
|
||||||
|
|||||||
11
tox.ini
11
tox.ini
@ -1,9 +1,10 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = py35, py36, py37, py38, py39, py310, pypy3, lint, docs-lint, pycodestyle
|
envlist = py{37,38,39,310,311,py3}, lint, docs-lint, pycodestyle
|
||||||
skipsdist = True
|
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]
|
[testenv]
|
||||||
usedevelop = True
|
use_develop = true
|
||||||
commands = pytest --cov=gunicorn {posargs}
|
commands = pytest --cov=gunicorn {posargs}
|
||||||
deps =
|
deps =
|
||||||
-rrequirements_test.txt
|
-rrequirements_test.txt
|
||||||
@ -25,10 +26,10 @@ commands =
|
|||||||
tests/test_util.py \
|
tests/test_util.py \
|
||||||
tests/test_valid_requests.py
|
tests/test_valid_requests.py
|
||||||
deps =
|
deps =
|
||||||
pylint
|
pylint<2.7
|
||||||
|
|
||||||
[testenv:docs-lint]
|
[testenv:docs-lint]
|
||||||
whitelist_externals =
|
allowlist_externals =
|
||||||
rst-lint
|
rst-lint
|
||||||
bash
|
bash
|
||||||
grep
|
grep
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user