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
pull/214/head
Christian Clauss 2021-04-16 14:31:09 +02:00 committed by GitHub
parent c21a573a7a
commit eb037403b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 5 deletions

14
.github/workflows/codespell.yml vendored 100644
View File

@ -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=""

View File

@ -1,15 +1,20 @@
name: lint_python name: python
on: [pull_request, push] on:
push:
branches: [ main ]
paths: '**.py'
pull_request:
branches: [ main ]
paths: '**.py'
jobs: jobs:
lint_python: python:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/setup-python@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: bandit --recursive --skip B101 . # B101 is assert statements
- run: black --check . || true - 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: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- run: isort --check-only --profile black . - run: isort --check-only --profile black .
- run: pip install -r requirements.txt || true - run: pip install -r requirements.txt || true