From 412f5927fb438a4164c1c6a226fddada43647467 Mon Sep 17 00:00:00 2001 From: Kylian Schmidt Date: Mon, 8 Sep 2025 15:49:09 +0200 Subject: [PATCH] Fix pipeline attempt (4): Add new apptainer gitlab runner --- .gitlab-ci.yml | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f24a3db..226c84c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,13 +18,8 @@ cache: # Build the Apptainer container build:container: stage: build - image: ubuntu:22.04 - before_script: - - apt-get update -qq - - apt-get install -y wget curl gpg - - wget -O /tmp/apptainer.deb https://github.com/apptainer/apptainer/releases/download/v1.2.5/apptainer_1.2.5_amd64.deb - - apt-get install -y /tmp/apptainer.deb - - mkdir -p $APPTAINER_CACHE_DIR + tags: + - apptainer script: - echo "Building Apptainer container..." - apptainer --version @@ -38,14 +33,10 @@ build:container: # Run tests inside the container test:pytest: stage: test - image: ubuntu:22.04 + tags: + - apptainer dependencies: - build:container - before_script: - - apt-get update -qq - - apt-get install -y wget curl gpg - - wget -O /tmp/apptainer.deb https://github.com/apptainer/apptainer/releases/download/v1.2.5/apptainer_1.2.5_amd64.deb - - apt-get install -y /tmp/apptainer.deb script: - echo "Running pytest inside container..." - apptainer exec $CONTAINER_IMAGE pytest /src/tests/ -v @@ -55,14 +46,10 @@ test:pytest: # Run tests with coverage test:coverage: stage: test - image: ubuntu:22.04 + tags: + - apptainer dependencies: - build:container - before_script: - - apt-get update -qq - - apt-get install -y wget curl gpg - - wget -O /tmp/apptainer.deb https://github.com/apptainer/apptainer/releases/download/v1.2.5/apptainer_1.2.5_amd64.deb - - apt-get install -y /tmp/apptainer.deb script: - echo "Running coverage analysis inside container..." - apptainer exec $CONTAINER_IMAGE pytest /src/tests/ --cov=/src --cov-report=xml --cov-report=term