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