Skip to content

Commit be51e6c

Browse files
committed
Update uv version in CI and use it in Docker for pinned deps
1 parent fd020c5 commit be51e6c

3 files changed

Lines changed: 643 additions & 628 deletions

File tree

.github/workflows/validate.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Set up uv
2727
uses: astral-sh/setup-uv@v3
2828
with:
29-
version: 0.4.x
29+
version: 0.9.x
3030
enable-cache: true
3131

3232
- name: Install dependencies
@@ -59,7 +59,7 @@ jobs:
5959
- name: Set up uv
6060
uses: astral-sh/setup-uv@v3
6161
with:
62-
version: 0.4.x
62+
version: 0.9.x
6363
enable-cache: true
6464

6565
- name: Install dependencies

Dockerfile

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
from python:3.11-slim-bookworm
1+
from ghcr.io/astral-sh/uv:0.9.21 as uv_image
2+
from python:3.11-slim-bookworm as builder
3+
copy --from=uv_image /uv /usr/local/bin/uv
24

35
run apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
46

@@ -7,17 +9,22 @@ workdir /app
79

810
copy CONTRIBUTING.md LICENSE /app/
911

12+
env UV_LINK_MODE=copy \
13+
UV_COMPILE_BYTECODE=1 \
14+
UV_PYTHON_DOWNLOADS=never \
15+
UV_SYSTEM_PYTHON=1 \
16+
UV_PROJECT_ENVIRONMENT=/usr/local
17+
1018
# Copy local version of the registry and install reqs
11-
copy pyproject.toml /app
19+
copy uv.lock pyproject.toml /app/
1220

1321
copy schemas /app/schemas
1422
copy yard /app/yard
1523
copy README.md /app/
16-
1724
# Needed to grab the VCS version from git tags
18-
run --mount=type=bind,target=/app/.git,source=.git pip install .
19-
copy tasks.py /app
25+
run --mount=type=bind,target=/app/.git,source=.git uv sync --all-extras --frozen
2026

27+
copy tasks.py /app/
2128
# Regenerate models from the current schemas
2229
run invoke regenerate-models
2330

0 commit comments

Comments
 (0)