Merge pull request #6018 from browniebroke/uv-locked-over-frozen

Use `--locked` instead of `--frozen` when running `uv sync`
This commit is contained in:
Jelmer 2025-09-08 15:50:50 +02:00 committed by GitHub
commit 45bcd9d690
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 6 additions and 6 deletions

View File

@ -39,7 +39,7 @@ steps:
{%- else %} {%- else %}
image: ghcr.io/astral-sh/uv:python3.12 image: ghcr.io/astral-sh/uv:python3.12
commands: commands:
- uv sync --frozen - uv sync --locked
- uv run pytest - uv run pytest
{%- endif%} {%- endif%}

View File

@ -115,10 +115,10 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v6 uses: actions/setup-python@v6
with: with:
python-version-file: ".python-version" python-version-file: ".python-version"
- name: Install dependencies - name: Install dependencies
run: uv sync run: uv sync --locked
- name: Check DB Migrations - name: Check DB Migrations
run: uv run python manage.py makemigrations --check run: uv run python manage.py makemigrations --check

View File

@ -45,7 +45,7 @@ pytest:
variables: variables:
DATABASE_URL: pgsql://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres/$POSTGRES_DB DATABASE_URL: pgsql://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres/$POSTGRES_DB
before_script: before_script:
- uv sync --frozen - uv sync --locked
script: script:
- uv run pytest - uv run pytest
{%- endif %} {%- endif %}

View File

@ -44,7 +44,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
RUN --mount=type=cache,target=/root/.cache/uv \ RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=uv.lock,target=uv.lock \ --mount=type=bind,source=uv.lock,target=uv.lock \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \ --mount=type=bind,source=pyproject.toml,target=pyproject.toml \
uv sync --frozen --no-install-project --no-dev uv sync --locked --no-install-project --no-dev
{%- if cookiecutter.frontend_pipeline in ['Gulp', 'Webpack'] %} {%- if cookiecutter.frontend_pipeline in ['Gulp', 'Webpack'] %}
COPY --from=client-builder ${APP_HOME} ${APP_HOME} COPY --from=client-builder ${APP_HOME} ${APP_HOME}
{% else %} {% else %}
@ -54,7 +54,7 @@ COPY . ${APP_HOME}
RUN --mount=type=cache,target=/root/.cache/uv \ RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=uv.lock,target=uv.lock \ --mount=type=bind,source=uv.lock,target=uv.lock \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \ --mount=type=bind,source=pyproject.toml,target=pyproject.toml \
uv sync --frozen --no-dev uv sync --locked --no-dev
# Python 'run' stage # Python 'run' stage
FROM python:3.12-slim-bookworm AS python-run-stage FROM python:3.12-slim-bookworm AS python-run-stage