Skip to content

Configurar CI/CD con GitHub Actions#36

Description

@jandrescodes

馃敡 Descripci贸n

Configurar un pipeline de CI/CD usando GitHub Actions para automatizar la ejecuci贸n de pruebas, validaci贸n de c贸digo y otras tareas del proyecto.

Nombre del archivo: .github/workflows/ci.yml

Prop贸sito:
Implementar integraci贸n continua para que cada push y pull request ejecute autom谩ticamente las pruebas unitarias con pytest, asegurando que el c贸digo cumple con los est谩ndares de calidad antes de ser mergeado a las ramas principales.


馃搵 Tareas

  • Crear directorio .github/workflows/ si no existe
  • Crear archivo ci.yml con configuraci贸n de GitHub Actions
  • Configurar workflow para ejecutar en push y pull requests
  • Configurar matriz de versiones de Python (3.12+)
  • Agregar step para instalar dependencias (pytest)
  • Agregar step para ejecutar tests con pytest
  • Configurar badge de estado en README.md
  • Probar el workflow con un PR de prueba
  • Documentar el proceso en README.md o archivo separado

馃挕 Ejemplo de Configuraci贸n Base

name: CI

on:
  push:
    branches: [ main, dev ]
  pull_request:
    branches: [ main, dev ]

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.12']
    
    steps:
    - uses: actions/checkout@v3
    
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v4
      with:
        python-version: ${{ matrix.python-version }}
    
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install pytest
    
    - name: Run tests
      run: pytest test_calculator.py -v

馃摉 Recursos


馃敆 Referencias

ClickUp Task: https://app.clickup.com/t/86ad30mwj

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

automatizaci贸nTareas de automatizaci贸nci/cdIntegraci贸n y despliegue continuofuncionalidadNuevas funcionalidadesgithub-actionsRelacionado con GitHub ActionspendienteA煤n no iniciada

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions