[DEV] add ruff for linting and combine linters into one workflow (#1875)
* remove unused and update black + precommit * makefile add ruff remove unused * F541 fix * complete ruff ignore * remove unused workflow and combine linters into one add lnbits/static to ruff ignore save preview and linelength for later define target version for black * ignore upgrades for mypy * remove flake8 * ignore F401 for __init__ files * unused pylint comment * unused noqa * ignore upgrades for black * run linting on py3.9 and py3.10 * dont assume python
This commit is contained in:
parent
642f9a4c00
commit
eb0b06f98c
16 changed files with 218 additions and 429 deletions
27
.github/workflows/flake8.yml
vendored
27
.github/workflows/flake8.yml
vendored
|
|
@ -1,27 +0,0 @@
|
|||
name: flake8
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.9"]
|
||||
poetry-version: ["1.5.1"]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Poetry ${{ matrix.poetry-version }}
|
||||
uses: abatilo/actions-poetry@v2
|
||||
with:
|
||||
poetry-version: ${{ matrix.poetry-version }}
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: "poetry"
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
poetry install --no-root
|
||||
- name: Run tests
|
||||
run: make flake8
|
||||
|
|
@ -1,13 +1,11 @@
|
|||
name: formatting
|
||||
|
||||
name: linter
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
checks:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.9"]
|
||||
python-version: ["3.9", "3.10"]
|
||||
poetry-version: ["1.5.1"]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
|
@ -20,14 +18,19 @@ jobs:
|
|||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: "poetry"
|
||||
- name: Install packages
|
||||
run: |
|
||||
poetry install --no-root
|
||||
npm install prettier
|
||||
|
||||
- name: Install python packages
|
||||
run: poetry install
|
||||
- name: Check black
|
||||
run: make checkblack
|
||||
- name: Check isort
|
||||
run: make checkisort
|
||||
- uses: actions/setup-node@v3
|
||||
- name: Check ruff
|
||||
run: make checkruff
|
||||
- name: Check mypy
|
||||
run: make mypy
|
||||
|
||||
- name: Install node packages
|
||||
run: npm i
|
||||
- name: Run tests
|
||||
run: make pyright
|
||||
- name: Check prettier
|
||||
run: make checkprettier
|
||||
27
.github/workflows/mypy.yml
vendored
27
.github/workflows/mypy.yml
vendored
|
|
@ -1,27 +0,0 @@
|
|||
name: mypy
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.9"]
|
||||
poetry-version: ["1.5.1"]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Poetry ${{ matrix.poetry-version }}
|
||||
uses: abatilo/actions-poetry@v2
|
||||
with:
|
||||
poetry-version: ${{ matrix.poetry-version }}
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: "poetry"
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
poetry install
|
||||
- name: Run tests
|
||||
run: make mypy
|
||||
27
.github/workflows/pylint.yml
vendored
27
.github/workflows/pylint.yml
vendored
|
|
@ -1,27 +0,0 @@
|
|||
name: pylint
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.9"]
|
||||
poetry-version: ["1.5.1"]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Poetry ${{ matrix.poetry-version }}
|
||||
uses: abatilo/actions-poetry@v2
|
||||
with:
|
||||
poetry-version: ${{ matrix.poetry-version }}
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: "poetry"
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
poetry install --no-root
|
||||
- name: Run tests
|
||||
run: make pylint
|
||||
28
.github/workflows/pyright.yml
vendored
28
.github/workflows/pyright.yml
vendored
|
|
@ -1,28 +0,0 @@
|
|||
name: pyright
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.9"]
|
||||
poetry-version: ["1.5.1"]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Poetry ${{ matrix.poetry-version }}
|
||||
uses: abatilo/actions-poetry@v2
|
||||
with:
|
||||
poetry-version: ${{ matrix.poetry-version }}
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: "poetry"
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
poetry install --no-root
|
||||
npm install
|
||||
- name: Run tests
|
||||
run: make pyright
|
||||
Loading…
Add table
Add a link
Reference in a new issue