Merge branch 'develop' #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI/CD for Wine Quality Predictor | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
# 1. Clonar el repositorio | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# 2. Configurar Python | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
# 3. Instalar dependencias | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
# 4. Ejecutar pruebas | |
- name: Run tests | |
run: | | |
pytest tests/ | |
deploy: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Deploy to Streamlit Cloud | |
env: | |
STREAMLIT_AUTH_TOKEN: ${{ secrets.STREAMLIT_AUTH_TOKEN }} | |
run: | | |
streamlit run app.py |