Skip to content
Snippets Groups Projects

Update pipeline to check types and formatting

Merged karp requested to merge update-pipeline into master
+ 22
0
@@ -3,12 +3,34 @@
@@ -3,12 +3,34 @@
# * Author: (c) 2011-present GitLab B.V.
# * Author: (c) 2011-present GitLab B.V.
# * URL: https://docs.gitlab.com/ee/ci/docker/using_kaniko.html#building-a-docker-image-with-kaniko
# * URL: https://docs.gitlab.com/ee/ci/docker/using_kaniko.html#building-a-docker-image-with-kaniko
# * License: CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0)
# * License: CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0)
 
stages:
 
- test
 
- build
 
 
variables:
 
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
 
 
testing:
 
image: python:latest
 
cache:
 
paths:
 
- .cache/pip
 
stage: test
 
before_script:
 
- pip install pipenv
 
- pipenv requirements --dev > requirements.txt
 
- pip install -r requirements.txt
 
script:
 
- black --check $CI_PROJECT_DIR
 
- mypy .
docker-build:
docker-build:
image:
image:
name: gcr.io/kaniko-project/executor:debug
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
entrypoint: [""]
stage: build
stage: build
 
# Run build stage regardless of the status of the test stage
 
when: always
before_script:
before_script:
- mkdir -p /kaniko/.docker
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
Loading