From fdcf5be4c92299ac351e0143c5d5949270b922b1 Mon Sep 17 00:00:00 2001 From: Anson Date: Fri, 23 May 2025 14:32:34 -0600 Subject: [PATCH] Run Pytest in the pipeline --- .gitlab-ci.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a7e03ac..f19c13f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,17 @@ -pages: - stage: deploy +variables: + UV_VERSION: 0.5 + PYTHON_VERSION: 3.12 + BASE_LAYER: bookworm-slim + # GitLab CI creates a separate mountpoint for the build directory, + # so we need to copy instead of using hard links. + UV_LINK_MODE: copy + +pytest: + image: ghcr.io/astral-sh/uv:$UV_VERSION-python$PYTHON_VERSION-$BASE_LAYER + stage: test script: - - mkdir public - - cp -r website/* public/ + - uv run pytest --junitxml=report.xml artifacts: - paths: - - public - only: - - main + when: always + reports: + junit: report.xml \ No newline at end of file