[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:
@@ -0,0 +1,36 @@
|
||||
name: linter
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
checks:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.9", "3.10"]
|
||||
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 python packages
|
||||
run: poetry install
|
||||
- name: Check black
|
||||
run: make checkblack
|
||||
- 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
|
||||
Reference in New Issue
Block a user