oc-p07-sentiment-api/.github/workflows/ci.yml
Grégoire Mureau 5b58da9f01 Préparer le repo P7 autonome : CI preprocessing, fetch-data, URLs prod.
Le dataset Sentiment140 reste hors git ; les tests TF/MLflow ne tournent pas encore sur le runner k3s.
2026-09-09 12:58:39 +02:00

30 lines
1,015 B
YAML

# CI — P7 Sentiment API
# Même fichier lu par Forgejo Actions et GitHub Actions (OC-ADR-001).
# Image job = node:22-bookworm (label runner mini-pc-k3s). Pas d'image ubuntu native.
name: CI
on:
push:
branches: [main]
workflow_dispatch:
jobs:
test-preprocessing:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Python + pytest (preprocessing only)
run: |
set -eu
apt-get update
apt-get install -y --no-install-recommends python3 python3-pip python3-venv
python3 -m pip install --break-system-packages nltk pytest
python3 -m nltk.downloader punkt punkt_tab stopwords wordnet omw-1.4
python3 -m pytest deployment/api/tests/test_preprocessing.py -q
# test_main.py charge TensorFlow + artefacts MLflow (prod). Pas dans ce job :
# trop lourd pour le runner (DinD 8 Gio) et exige des secrets MLflow.
# Build/push image : Phase 6 (dual registry), après secrets Forgejo.