summaryrefslogtreecommitdiffstats
path: root/.github/workflows
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@calcurse.org>2021-04-03 13:25:51 -0400
committerLukas Fleischer <lfleischer@calcurse.org>2021-04-03 18:12:31 -0400
commit81c26f8fd588c286cd262068a76234599191a4e9 (patch)
treee816d4b67c8bbe5a526e637b98e89b2fe655dcff /.github/workflows
parent3e8bba2fd1e71899adaa88fc1fbdeacd7b51815e (diff)
downloadcalcurse-81c26f8fd588c286cd262068a76234599191a4e9.tar.gz
calcurse-81c26f8fd588c286cd262068a76234599191a4e9.zip
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>
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/lint_python.yml21
1 files changed, 21 insertions, 0 deletions
diff --git a/.github/workflows/lint_python.yml b/.github/workflows/lint_python.yml
new file mode 100644
index 0000000..c04a772
--- /dev/null
+++ b/.github/workflows/lint_python.yml
@@ -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 .