oc-p07-sentiment-api/.github/workflows/ci.yml
Grégoire Mureau 22ae3b05a0 Ajouter le job CD P7 : build/push vers le registry OCI Forgejo.
Le job ne tourne que sur git.gregoiremureau.com. Pas de cut-over k3s : la prod reste sur Docker Hub.
2026-09-09 18:14:11 +02:00

30 lines
1 KiB
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 : .github/workflows/cd.yml (registry Forgejo, pas de cut-over k3s).