Skip to content

Delete session2/ml-app/pyvenv.cfg #9

Delete session2/ml-app/pyvenv.cfg

Delete session2/ml-app/pyvenv.cfg #9

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
cd session2/ml-app
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests with pytest
run: |
cd session2/ml-app
python -m pytest tests/ -v
train-model:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
cd session2/ml-app
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Train model
run: |
cd session2/ml-app
python src/train.py
- name: Upload trained model
uses: actions/upload-artifact@v4
with:
name: trained-model
path: session2/ml-app/models/
retention-days: 7
- name: Upload evaluation plots
uses: actions/upload-artifact@v4
with:
name: evaluation-plots
path: session2/ml-app/*.png
retention-days: 7
deploy-docs:
runs-on: ubuntu-latest
needs: train-model
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Deploy documentation
run: |
echo "Documentation would be deployed here"
echo "ML App is located in: session2/ml-app/"
echo "Project structure is ready for deployment"