ci: add pre-commit job
This commit is contained in:
parent
0061e82ecd
commit
45630be695
|
@ -121,6 +121,20 @@ changelog_snippet:
|
|||
when: never
|
||||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||
|
||||
pre-commit:
|
||||
stage: lint
|
||||
image: python:3.10
|
||||
variables:
|
||||
PIP_CACHE_DIR: $CI_PROJECT_DIR/.cache/pip
|
||||
PRE_COMMIT_HOME: $CI_PROJECT_DIR/.cache/pre-commit
|
||||
cache:
|
||||
paths:
|
||||
- $PIP_CACHE_DIR
|
||||
- $PRE_COMMIT_HOME
|
||||
before_script:
|
||||
- pip3 install pre-commit
|
||||
script:
|
||||
- pre-commit run --all --color=always --show-diff-on-failure
|
||||
|
||||
black:
|
||||
interruptible: true
|
||||
|
@ -357,7 +371,6 @@ deploy_documentation:
|
|||
only:
|
||||
- stable
|
||||
|
||||
|
||||
.docker_publish:
|
||||
stage: publish
|
||||
image: egon0/docker-with-buildx-and-git:bash
|
||||
|
|
Loading…
Reference in New Issue