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:
committed by
GitHub
parent
72def373e3
commit
580d60ec4f
@@ -19,15 +19,16 @@ jobs:
|
|||||||
uses: actions/setup-python@v6
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: '3.14'
|
python-version: '3.14'
|
||||||
|
- name: Configurar uv
|
||||||
|
uses: astral-sh/setup-uv@v6
|
||||||
- name: Instalar dependencias
|
- name: Instalar dependencias
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
uv sync --no-dev --no-install-project
|
||||||
pip install -r requirements.txt
|
|
||||||
- name: Ejecutar tests
|
- name: Ejecutar tests
|
||||||
env:
|
env:
|
||||||
DJANGO_SETTINGS_MODULE: proyecto.settings
|
DJANGO_SETTINGS_MODULE: proyecto.settings
|
||||||
run: |
|
run: |
|
||||||
python manage.py test
|
uv run python manage.py test
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -16,15 +16,16 @@ jobs:
|
|||||||
uses: actions/setup-python@v6
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: '3.14'
|
python-version: '3.14'
|
||||||
|
- name: Configurar uv
|
||||||
|
uses: astral-sh/setup-uv@v6
|
||||||
- name: Instalar dependencias
|
- name: Instalar dependencias
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
uv sync --no-dev --no-install-project
|
||||||
pip install -r requirements.txt
|
|
||||||
- name: Ejecutar tests
|
- name: Ejecutar tests
|
||||||
env:
|
env:
|
||||||
DJANGO_SETTINGS_MODULE: proyecto.settings
|
DJANGO_SETTINGS_MODULE: proyecto.settings
|
||||||
run: |
|
run: |
|
||||||
python manage.py test
|
uv run python manage.py test
|
||||||
docker:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: test
|
needs: test
|
||||||
|
|||||||
+3
-2
@@ -4,9 +4,10 @@ ENV PYTHONDONTWRITEBYTECODE=1
|
|||||||
ENV PYTHONUNBUFFERED=1
|
ENV PYTHONUNBUFFERED=1
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY requirements.txt /app/
|
COPY pyproject.toml /app/
|
||||||
RUN apk --no-cache update && apk --no-cache upgrade
|
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/
|
COPY . /app/
|
||||||
RUN chmod +x /app/entrypoint.sh
|
RUN chmod +x /app/entrypoint.sh
|
||||||
|
|||||||
+3
-3
@@ -5,10 +5,10 @@ set -eu
|
|||||||
echo "Sleeping due to mysql..."
|
echo "Sleeping due to mysql..."
|
||||||
sleep 10
|
sleep 10
|
||||||
echo "Running DB migrations..."
|
echo "Running DB migrations..."
|
||||||
python manage.py migrate
|
uv run python manage.py migrate
|
||||||
echo "Collecting STATIC..."
|
echo "Collecting STATIC..."
|
||||||
python manage.py collectstatic --noinput --clear
|
uv run python manage.py collectstatic --noinput --clear
|
||||||
|
|
||||||
echo "Running server!"
|
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="*"
|
||||||
|
|||||||
@@ -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
|
||||||
Reference in New Issue
Block a user