From b914ef7d05661a1d2c7e7b3662eebb43839c85b8 Mon Sep 17 00:00:00 2001 From: Leander Karp <karp@cl.uni-heidelberg.de> Date: Wed, 4 Sep 2024 15:07:21 +0200 Subject: [PATCH] Update pipeline to check types and formatting (cherry picked from commit 2576afc09e12f51913fa4a8361181a6eaa5729ee) --- .gitlab-ci.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bc89b0d..1fab6fd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,10 @@ +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. -- GitLab