From 81c26f8fd588c286cd262068a76234599191a4e9 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sat, 3 Apr 2021 13:25:51 -0400 Subject: 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 --- .github/workflows/lint_python.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/lint_python.yml 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 . -- cgit v1.2.3-54-g00ecf