From a82c911313f9beda511ccf7eba77593d7bd2eb11 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 26 Feb 2020 05:54:36 +0100 Subject: [PATCH] Add GitHub Action to lint Python code https://github.com/mingrammer/diagrams/actions https://github.com/cclauss/diagrams/actions --- .github/workflows/lint_python.yml | 18 ++++++++++++++++++ 1 file changed, 18 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 00000000..507beee3 --- /dev/null +++ b/.github/workflows/lint_python.yml @@ -0,0 +1,18 @@ +name: lint_python +on: + pull_request: + push: + # branches: [master] +jobs: + lint_python: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: actions/setup-python@master + - run: pip install black codespell flake8 isort pytest + - run: black . --diff || true + - run: codespell --quiet-level=2 || true # --ignore-words-list="" --skip="" + - run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + - run: isort --recursive . || true + - run: pip install -r requirements.txt || true + - run: pytest . || true