From 72e4b15af64781a407c7c3a589e8f9a6e5fb3655 Mon Sep 17 00:00:00 2001 From: nguyed99 <nguyed99@zedat.fu-berlin.de> Date: Fri, 19 Jan 2024 17:20:04 +0100 Subject: [PATCH] Update CI/CD pipeline --- .gitlab-ci.yml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 35bc6cb..2f23a1e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,24 +3,30 @@ stages: - test-jobs - test-tasks +image: python:3.11-bullseye + variables: - REGISTRY: git.imp.fu-berlin.de:5000/nguyed99/comp-sci-project - CONTAINER_IMAGE: $REGISTRY:$CI_COMMIT_REF_SLUG + PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" -before_script: - - echo "$CI_JOB_TOKEN" | docker login -u "$CI_REGISTRY_USER" --password-stdin $REGISTRY +cache: + paths: + - .cache/pip -build-image: +build-env: stage: build script: - - ./build/build-image-local.sh + - pip install poetry + - cd build/ + - poetry install + - poetry shell + - cd.. test-jobs: stage: test-jobs script: - - docker run $CONTAINER_IMAGE /bin/sh -c "pytest /root/jobs/tests" + - pytest jobs/tests/ test-tasks: stage: test-tasks script: - - docker run $CONTAINER_IMAGE /bin/sh -c "pytest /root/tasks/tests" \ No newline at end of file + - pytest tasks/tests/ \ No newline at end of file -- GitLab