Unverified Commit b914ef7d authored by karp's avatar karp
Browse files

Update pipeline to check types and formatting

(cherry picked from commit 2576afc0)
parent c02109e4
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
stages:
    - test
    - deploy

variables:
  PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"

lint-openapi:
    image:
        name: redocly/cli
@@ -36,6 +43,20 @@ test-frontend:
            - cypress/screenshots
        expire_in: 1 week

test-python:
    image: python:latest
    stage: test
    cache: 
      paths:
        - .cache/pip
    before_script:
        - pip install pipenv
        - pipenv requirements --dev > requirements.txt
        - pip install -r requirements.txt 
    script:
        - black --check $CI_PROJECT_DIR
        - mypy .

# This snippet is copied and modified from the GitLab Documentation (as of 2021-01-10, the contents of the script seem to have changed by now)
#   * Title of the documentation page: "Building a Docker image with kaniko"
#   * Author: (c) 2011-present GitLab B.V.