From f4974a8e61c0e44ba82cc75af08feab744a55044 Mon Sep 17 00:00:00 2001 From: Klaus Wakonig Date: Fri, 14 Jul 2023 19:03:25 +0200 Subject: [PATCH] ci: added ci file --- .gitlab-ci.yml | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..38e0ddf --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,47 @@ +# This file is a template, and might need editing before it works on your project. +# Official language image. Look for the different tagged releases at: +# https://hub.docker.com/r/library/python/tags/ +image: $CI_DOCKER_REGISTRY/python:3.8 + +#commands to run in the Docker container before starting each job. +before_script: + - pip install -e .[dev] + +# different stages in the pipeline +stages: + - Formatter + - Test + - AdditionalTests + - Deploy + +formatter: + stage: Formatter + script: + - pip install black + - black --check --diff --color --line-length=100 ./ + +pytest: + stage: Test + script: + - pytest -v --random-order ./tests + +tests-3.9: + stage: AdditionalTests + image: $CI_DOCKER_REGISTRY/python:3.9 + needs: ["pytest"] + script: + - pytest -v --random-order ./tests + allow_failure: true + +tests-3.10: + extends: "tests-3.9" + stage: AdditionalTests + image: $CI_DOCKER_REGISTRY/python:3.10 + allow_failure: true + +tests-3.11: + extends: "tests-3.9" + stage: AdditionalTests + image: $CI_DOCKER_REGISTRY/python:3.11 + allow_failure: true +