Add black cicd testing

This commit is contained in:
Zedifus 2022-03-23 01:57:46 +00:00
parent 698594087c
commit dfd3220482

View File

@ -1,5 +1,5 @@
stages: stages:
- test - lint
- prod-deployment - prod-deployment
- dev-deployment - dev-deployment
@ -7,8 +7,20 @@ variables:
DOCKER_HOST: tcp://docker:2376 DOCKER_HOST: tcp://docker:2376
DOCKER_TLS_CERTDIR: "/certs" 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: pylint:
stage: test stage: lint
image: python:3.7-slim image: python:3.7-slim
tags: tags:
- 'docker' - 'docker'