Skip to content

Commit

Permalink
Move lint from tox to gh action
Browse files Browse the repository at this point in the history
  • Loading branch information
jairhenrique committed Dec 10, 2023
1 parent cebdd45 commit c1ecce5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 14 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -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 .
17 changes: 3 additions & 14 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c1ecce5

Please sign in to comment.