Add testing job to GitHub Actions workflow for Docker image build
This commit is contained in:
@@ -6,8 +6,27 @@ on:
|
||||
- '**' # Esto aplica para cualquier rama
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout del código
|
||||
uses: actions/checkout@v4
|
||||
- name: Configurar Python
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: '3.14'
|
||||
- name: Instalar dependencias
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
- name: Ejecutar tests
|
||||
env:
|
||||
DJANGO_SETTINGS_MODULE: proyecto.settings
|
||||
run: |
|
||||
python manage.py test
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write # Necesario para subir a GHCR
|
||||
|
||||
Reference in New Issue
Block a user