diff --git a/docker/multiversion-test/Dockerfile b/docker/multiversion-test/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..02768e1b81fc7b12b4bb51c233948b639e4508df --- /dev/null +++ b/docker/multiversion-test/Dockerfile @@ -0,0 +1,59 @@ +# Dockerfile to test Autosubmit API in different Python versions + +# Test Python 3.9 +FROM python:3.9-slim-bullseye as test39 + +ARG AUTOSUBMIT_ROOT_DIR=/app/autosubmit/ +WORKDIR "${AUTOSUBMIT_ROOT_DIR}" + +RUN apt-get update && apt-get install -y git graphviz gcc lsof + +# Install Autosubmit API +ARG GIT_REF="main" +RUN git clone https://earth.bsc.es/gitlab/es/autosubmit-api.git . && \ + git checkout ${GIT_REF} +RUN pip install -e .[all] + +RUN pytest + +# Test Python 3.10 +FROM python:3.10-slim-bullseye as test310 + +ARG AUTOSUBMIT_ROOT_DIR=/app/autosubmit/ +WORKDIR "${AUTOSUBMIT_ROOT_DIR}" + +RUN apt-get update && apt-get install -y git graphviz gcc lsof + +COPY --from=test39 /app/autosubmit/ /app/autosubmit/ + +RUN pip install -e .[all] + +RUN pytest + +# Test Python 3.11 +FROM python:3.11-slim-bullseye as test311 + +ARG AUTOSUBMIT_ROOT_DIR=/app/autosubmit/ +WORKDIR "${AUTOSUBMIT_ROOT_DIR}" + +RUN apt-get update && apt-get install -y git graphviz gcc lsof + +COPY --from=test310 /app/autosubmit/ /app/autosubmit/ + +RUN pip install -e .[all] + +RUN pytest + +# Test Python 3.12 +FROM python:3.12-slim-bullseye as test312 + +ARG AUTOSUBMIT_ROOT_DIR=/app/autosubmit/ +WORKDIR "${AUTOSUBMIT_ROOT_DIR}" + +RUN apt-get update && apt-get install -y git graphviz gcc lsof + +COPY --from=test311 /app/autosubmit/ /app/autosubmit/ + +RUN pip install -e .[all] + +RUN pytest \ No newline at end of file diff --git a/docker/multiversion-test/test.sh b/docker/multiversion-test/test.sh new file mode 100755 index 0000000000000000000000000000000000000000..9168c76097014eb6e9e4f3cf82f373bafed09af2 --- /dev/null +++ b/docker/multiversion-test/test.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# Build the docker image and then remove it + +docker build -t multiversion-test . && docker rmi multiversion-test \ No newline at end of file diff --git a/setup.py b/setup.py index 272f191830b998a4be610fd0c718e9f8624475cd..7ab919bf27719a5240b7eae838d56af1b083314b 100644 --- a/setup.py +++ b/setup.py @@ -29,14 +29,14 @@ install_requires = [ "portalocker~=2.6.0", "networkx<=2.6.3", "scipy~=1.11.4", - "python-dotenv", + "python-dotenv~=1.0.1", "autosubmitconfigparser>=1.0.65", "autosubmit>=3.13", - "Flask-APScheduler", - "gunicorn", + "Flask-APScheduler~=1.13.1", + "gunicorn~=22.0.0", "pydantic~=2.5.2", "SQLAlchemy~=2.0.23", - "python-cas>=1.6.0" + "python-cas~=1.6.0" ] # Test dependencies