diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3881558..32843f2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -144,6 +144,8 @@ cache: script: - | set -euo pipefail + + buildah pull $IMAGE_NAME:$CI_COMMIT_SHA if [ -n "${CI_COMMIT_TAG:-}" ]; then buildah tag $IMAGE_NAME:$CI_COMMIT_SHA $IMAGE_NAME:$CI_COMMIT_TAG diff --git a/Containerfile b/Containerfile index 797681c..6088d41 100644 --- a/Containerfile +++ b/Containerfile @@ -71,9 +71,7 @@ COPY ./tests ./tests RUN uv pip install -e . -RUN mkdir -p /app/cov - -RUN mkdir /app/cov/html +RUN mkdir -p /app/cov && mkdir /app/cov/html CMD [ "sh", "-c", "coverage run --source=src -m pytest -v && coverage report > /app/cov/coverage.txt && coverage xml -o /app/cov/coverage.xml && coverage html -d /app/cov/html" ] @@ -91,10 +89,14 @@ WORKDIR /app RUN mkdir -p ./src/template_project -COPY ./src/template_project ./src/template_project +RUN uv sync --no-install-project --group migrations --frozen --no-cache + +COPY ./src ./src + +COPY ./tests ./tests COPY ./alembic.ini ./ -RUN uv sync --group migrations --frozen --no-cache +RUN uv pip install -e . CMD [ "alembic", "upgrade", "head" ]