From eb037403b81dbc4d84e503316f1600b003915eaf Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Fri, 16 Apr 2021 14:31:09 +0200 Subject: [PATCH] Move codespell to a separate GitHub Action (#209) * Move codespell to a separate GitHub Action * paths: '**.py' * Update codespell.yml * Update lint_python.yml * Update and rename lint_python.yml to python.yml --- .github/workflows/codespell.yml | 14 ++++++++++++++ .github/workflows/{lint_python.yml => python.yml} | 15 ++++++++++----- 2 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/codespell.yml rename .github/workflows/{lint_python.yml => python.yml} (72%) diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 00000000..9cfc5988 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,14 @@ +name: codespell +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] +jobs: + codespell: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - run: pip install codespell + - run: codespell --ignore-words-list="ans,nnumber,nin" --quiet-level=2 # --skip="" diff --git a/.github/workflows/lint_python.yml b/.github/workflows/python.yml similarity index 72% rename from .github/workflows/lint_python.yml rename to .github/workflows/python.yml index 476d2cc8..29479ba8 100644 --- a/.github/workflows/lint_python.yml +++ b/.github/workflows/python.yml @@ -1,15 +1,20 @@ -name: lint_python -on: [pull_request, push] +name: python +on: + push: + branches: [ main ] + paths: '**.py' + pull_request: + branches: [ main ] + paths: '**.py' jobs: - lint_python: + python: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 - - run: pip install bandit black codespell flake8 isort mypy pytest pyupgrade safety + - run: pip install bandit black flake8 isort mypy pytest pyupgrade safety - run: bandit --recursive --skip B101 . # B101 is assert statements - run: black --check . || true - - run: codespell --ignore-words-list="ans,nnumber,nin" --quiet-level=2 # --skip="" - run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - run: isort --check-only --profile black . - run: pip install -r requirements.txt || true