1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-09 01:03:24 +00:00

Move lint from tox to gh action

This commit is contained in:
Jair Henrique
2023-12-10 20:31:35 -03:00
parent cebdd45849
commit 796dc8de7e
3 changed files with 33 additions and 23 deletions

22
.github/workflows/lint.yml vendored Normal file
View File

@@ -0,0 +1,22 @@
name: Lint
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- name: Install dependencies
run: pip install ruff
- name: Lint
run: |
ruff --version
ruff format --check .
ruff check .

View File

@@ -139,7 +139,6 @@ in this example::
tox
# Run the whole test suite or just part of it
tox -e lint
tox -e py38-requests

17
tox.ini
View File

@@ -2,7 +2,6 @@
skip_missing_interpreters=true
envlist =
cov-clean,
lint,
{py38,py39,py310,py311,py312}-{requests-urllib3-1,httplib2,urllib3-1,tornado4,boto3,aiohttp,httpx},
{py310,py311,py312}-{requests-urllib3-2,urllib3-2},
{pypy3}-{requests-urllib3-1,httplib2,urllib3-1,tornado4,boto3},
@@ -14,7 +13,7 @@ envlist =
python =
3.8: py38
3.9: py39
3.10: py310, lint
3.10: py310
3.11: py311
3.12: py312
pypy-3: pypy3
@@ -33,16 +32,6 @@ commands =
coverage html
coverage report --fail-under=90
[testenv:lint]
skipsdist = True
commands =
ruff --version
ruff format --check .
ruff check .
deps =
ruff
basepython = python3.10
[testenv]
# Need to use develop install so that paths
# for aggregate code coverage combine
@@ -73,8 +62,8 @@ deps =
httpx019: httpx==0.19
{py38,py39,py310}-{httpx}: pytest-asyncio
depends =
lint,{py38,py39,py310,py311,py312,pypy3}-{requests-urllib3-1,httplib2,urllib3-1,tornado4,boto3},{py310,py311,py312}-{requests-urllib3-2,urllib3-2},{py38,py39,py310,py311,py312}-{aiohttp},{py38,py39,py310,py311,py312}-{httpx}: cov-clean
cov-report: lint,{py38,py39,py310,py311,py312,pypy3}-{requests-urllib3-1,httplib2,urllib3-1,tornado4,boto3},{py310,py311,py312}-{requests-urllib3-2,urllib3-2},{py38,py39,py310,py311,py312}-{aiohttp}
{py38,py39,py310,py311,py312,pypy3}-{requests-urllib3-1,httplib2,urllib3-1,tornado4,boto3},{py310,py311,py312}-{requests-urllib3-2,urllib3-2},{py38,py39,py310,py311,py312}-{aiohttp},{py38,py39,py310,py311,py312}-{httpx}: cov-clean
cov-report: {py38,py39,py310,py311,py312,pypy3}-{requests-urllib3-1,httplib2,urllib3-1,tornado4,boto3},{py310,py311,py312}-{requests-urllib3-2,urllib3-2},{py38,py39,py310,py311,py312}-{aiohttp}
passenv =
AWS_ACCESS_KEY_ID
AWS_DEFAULT_REGION