Skip to content
Snippets Groups Projects

Update pipeline to check types and formatting

Merged karp requested to merge update-pipeline into master
1 file
+ 21
0
Compare changes
  • Side-by-side
  • Inline
+ 22
0
@@ -3,12 +3,34 @@
# * Author: (c) 2011-present GitLab B.V.
# * 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)
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:
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
stage: build
# Run build stage regardless of the status of the test stage
when: always
before_script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
Loading