mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-09-13 07:22:35 +03:00
Merge pull request #6018 from browniebroke/uv-locked-over-frozen
Use `--locked` instead of `--frozen` when running `uv sync`
This commit is contained in:
commit
45bcd9d690
|
@ -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%}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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 %}
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user