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.ymlpull/214/head
parent
c21a573a7a
commit
eb037403b8
|
@ -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=""
|
|
@ -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
|
Loading…
Reference in New Issue