Add uv project config and switch CI/Docker installs to uv

Agent-Logs-Url: https://github.com/dsaub/proyecto-final/sessions/7a547c09-9817-47a6-979e-c19cbcaa4c08

Co-authored-by: dsaub <54474838+dsaub@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-05-08 07:51:40 +00:00
committed by GitHub
parent 72def373e3
commit 580d60ec4f
5 changed files with 37 additions and 12 deletions
+4 -3
View File
@@ -19,15 +19,16 @@ jobs:
uses: actions/setup-python@v6
with:
python-version: '3.14'
- name: Configurar uv
uses: astral-sh/setup-uv@v6
- name: Instalar dependencias
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
uv sync --no-dev --no-install-project
- name: Ejecutar tests
env:
DJANGO_SETTINGS_MODULE: proyecto.settings
run: |
python manage.py test
uv run python manage.py test
docker:
runs-on: ubuntu-latest
+4 -3
View File
@@ -16,15 +16,16 @@ jobs:
uses: actions/setup-python@v6
with:
python-version: '3.14'
- name: Configurar uv
uses: astral-sh/setup-uv@v6
- name: Instalar dependencias
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
uv sync --no-dev --no-install-project
- name: Ejecutar tests
env:
DJANGO_SETTINGS_MODULE: proyecto.settings
run: |
python manage.py test
uv run python manage.py test
docker:
runs-on: ubuntu-latest
needs: test
+3 -2
View File
@@ -4,9 +4,10 @@ ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
WORKDIR /app
COPY requirements.txt /app/
COPY pyproject.toml /app/
RUN apk --no-cache update && apk --no-cache upgrade
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir uv
RUN uv sync --no-dev --no-install-project
COPY . /app/
RUN chmod +x /app/entrypoint.sh
+3 -3
View File
@@ -5,10 +5,10 @@ set -eu
echo "Sleeping due to mysql..."
sleep 10
echo "Running DB migrations..."
python manage.py migrate
uv run python manage.py migrate
echo "Collecting STATIC..."
python manage.py collectstatic --noinput --clear
uv run python manage.py collectstatic --noinput --clear
echo "Running server!"
gunicorn --bind 0.0.0.0:8000 proyecto.wsgi:application --forwarded-allow-ips="*"
uv run gunicorn --bind 0.0.0.0:8000 proyecto.wsgi:application --forwarded-allow-ips="*"
+22
View File
@@ -0,0 +1,22 @@
[project]
name = "proyecto-final"
version = "0.1.0"
requires-python = ">=3.14"
dependencies = [
"celery==5.6.3",
"Django==6.0.5",
"django-compressor==4.6.0",
"django-redis==6.0.0",
"django-storages[s3]==1.14.6",
"fpdf2==2.8.7",
"gunicorn==26.0.0",
"paypalrestsdk==1.13.3",
"pillow==12.2.0",
"psycopg2-binary==2.9.12",
"requests==2.33.1",
"stripe==15.1.0",
"whitenoise==6.12.0",
]
[tool.uv]
package = false