diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ecf364486..177ad5b12 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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