Fix pipeline attempt (4): Add new apptainer gitlab runner
This commit is contained in:
+6
-19
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user