-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
49 lines (45 loc) · 1.18 KB
/
.gitlab-ci.yml
File metadata and controls
49 lines (45 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
stages:
- install_and_deploy
variables:
UV_VERSION: "0.9.28"
PYTHON_VERSION: "3.12"
BASE_LAYER: alpine
# GitLab CI creates a separate mountpoint for the build directory,
# so we need to copy instead of using hard links.
UV_LINK_MODE: copy
uv-setup:
stage: install_and_deploy
image: ghcr.io/astral-sh/uv:$UV_VERSION-python$PYTHON_VERSION-$BASE_LAYER
variables:
UV_CACHE_DIR: .uv-cache
cache:
- key:
files:
- uv.lock
paths:
- $UV_CACHE_DIR
before_script:
- apk add g++ build-base linux-headers
script:
- uv sync
- uv cache prune --ci
# pytest:
# stage: install_and_deploy
# needs: ["uv-setup"]
# script:
- uv run pytest "tests/test_contingency.py"
# zensical:
# stage: install_and_deploy
# needs: ["uv-setup"]
# script:
- uv run zensical build
# - mv site public
artifacts:
paths:
- site
pages:
# The folder that contains the files to be exposed at the Page URL
publish: site
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH