mirror of https://github.com/stijndcl/didier
Add pre-commit config, make tests a requirement for quality checks
parent
3057222607
commit
e371e2cc5c
|
@ -62,7 +62,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.CODECOV }}
|
token: ${{ secrets.CODECOV }}
|
||||||
linting:
|
linting:
|
||||||
needs: [dependencies]
|
needs: [tests]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
@ -82,7 +82,7 @@ jobs:
|
||||||
- name: Linting
|
- name: Linting
|
||||||
run: flake8
|
run: flake8
|
||||||
typing:
|
typing:
|
||||||
needs: [dependencies]
|
needs: [tests]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
@ -102,7 +102,7 @@ jobs:
|
||||||
- name: Typing
|
- name: Typing
|
||||||
run: mypy didier database
|
run: mypy didier database
|
||||||
formatting:
|
formatting:
|
||||||
needs: [dependencies]
|
needs: [tests]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
default_language_version:
|
||||||
|
python: python3.9.5
|
||||||
|
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/ambv/black
|
||||||
|
rev: 22.3.0
|
||||||
|
hooks:
|
||||||
|
- id: black
|
||||||
|
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v4.3.0
|
||||||
|
hooks:
|
||||||
|
- id: check-json
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: pretty-format-json
|
||||||
|
- id: trailing-whitespace
|
||||||
|
|
||||||
|
- repo: https://github.com/pycqa/isort
|
||||||
|
rev: 5.10.1
|
||||||
|
hooks:
|
||||||
|
- id: isort
|
||||||
|
|
||||||
|
- repo: https://github.com/PyCQA/autoflake
|
||||||
|
rev: v1.4
|
||||||
|
hooks:
|
||||||
|
- id: autoflake
|
||||||
|
name: autoflake (python)
|
||||||
|
args:
|
||||||
|
- "--remove-all-unused-imports"
|
||||||
|
- "--in-place"
|
||||||
|
- "--ignore-init-module-imports"
|
||||||
|
|
||||||
|
- repo: https://github.com/PyCQA/flake8
|
||||||
|
rev: 4.0.1
|
||||||
|
hooks:
|
||||||
|
- id: flake8
|
||||||
|
additional_dependencies:
|
||||||
|
- "flake8-bandit"
|
||||||
|
- "flake8-bugbear"
|
||||||
|
- "flake8-docstrings"
|
||||||
|
- "flake8-dunder-all"
|
||||||
|
- "flake8-eradicate"
|
||||||
|
- "flake8-isort"
|
||||||
|
- "flake8-simplify"
|
Loading…
Reference in New Issue