From 28a556becd2c63c6a5b3fae7c51dde5e74c75c15 Mon Sep 17 00:00:00 2001 From: Twirre Meulenbelt <43213592+TwirreM@users.noreply.github.com> Date: Tue, 2 Dec 2025 21:12:15 +0100 Subject: [PATCH] feat: introduce CI/CD with tests Using a custom base image installed on the runner, the installation and tests should work (fast). ref: N25B-367 --- .gitlab-ci.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..9b19c89 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,38 @@ +# ---------- GLOBAL SETUP ---------- # +workflow: + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + +stages: + - install + - test + +default: + image: qi-py-ri-base:latest + cache: + key: "${CI_COMMIT_REF_SLUG}" + paths: + - .venv/ + policy: pull-push + +# --------- INSTALLING --------- # +install: + stage: install + tags: + - install + script: + - pip install -r requirements.txt + artifacts: + paths: + - .venv/ + expire_in: 1h + +# ---------- TESTING ---------- # +test: + stage: test + needs: + - install + tags: + - test + script: + - PYTHONPATH=${PYTHONPATH}:src pytest test/