diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6d0a4212..708bb257 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ stages: -- test +- lint - prod-deployment - dev-deployment @@ -7,8 +7,20 @@ variables: DOCKER_HOST: tcp://docker:2376 DOCKER_TLS_CERTDIR: "/certs" +black: + stage: lint + image: registry.gitlab.com/pipeline-components/black:latest + tags: + - 'docker' + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + - if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS' + when: never + script: + - black --check --verbose -- . + pylint: - stage: test + stage: lint image: python:3.7-slim tags: - 'docker'