Add GitHub Actions workflow lint_python
Run codespell, flake8, and isort for each change to one of the scripts in contrib/. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
parent
3e8bba2fd1
commit
81c26f8fd5
21
.github/workflows/lint_python.yml
vendored
Normal file
21
.github/workflows/lint_python.yml
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
name: Lint Python
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths: ['contrib/**']
|
||||||
|
push:
|
||||||
|
paths: ['contrib/**']
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint_python:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: contrib
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-python@v2
|
||||||
|
- run: pip install codespell flake8 isort
|
||||||
|
- run: codespell --quiet-level=2 || true
|
||||||
|
- run: flake8 --count --show-source --statistics
|
||||||
|
- run: isort --check-only --profile black .
|
Loading…
x
Reference in New Issue
Block a user