Claude commited on
Commit
25e27e5
·
unverified ·
1 Parent(s): 6585fc6

fix(ci): corriger les échecs CI sur toutes les plateformes

Browse files

Deux causes identifiées :

1. `fastapi` et `uvicorn` manquaient dans les dépendances `[dev]`.
`test_sprint6_web_interface.py` importe `fastapi.testclient.TestClient`
au niveau module — sans FastAPI installé, pytest échoue à collecter
les 121 tests de ce fichier sur toutes les combinaisons OS/Python.

2. Le step "Run tests" utilisait `\` pour la continuation de ligne sans
`shell: bash`. Sur Windows, GitHub Actions utilise PowerShell par
défaut ; `\` n'y est pas un caractère de continuation, ce qui
provoquait une erreur de parsing de la commande pytest.

Fixes :
- pyproject.toml : ajouter `fastapi>=0.111.0` et `uvicorn[standard]>=0.29.0`
aux extras `[dev]`
- ci.yml : ajouter `shell: bash` au step "Run tests"

https://claude.ai/code/session_017gXea9mxBQqDTAsSQd7aAq

Files changed (2) hide show
  1. .github/workflows/ci.yml +1 -0
  2. pyproject.toml +1 -1
.github/workflows/ci.yml CHANGED
@@ -72,6 +72,7 @@ jobs:
72
 
73
  # ── Tests ───────────────────────────────────────────────────
74
  - name: Run tests
 
75
  run: |
76
  pytest tests/ -q --tb=short --no-header \
77
  --cov=picarones --cov-report=xml --cov-report=term-missing
 
72
 
73
  # ── Tests ───────────────────────────────────────────────────
74
  - name: Run tests
75
+ shell: bash
76
  run: |
77
  pytest tests/ -q --tb=short --no-header \
78
  --cov=picarones --cov-report=xml --cov-report=term-missing
pyproject.toml CHANGED
@@ -41,7 +41,7 @@ Changelog = "https://github.com/bnf/picarones/blob/main/CHANGELOG.md"
41
 
42
  [project.optional-dependencies]
43
  # Développement et tests
44
- dev = ["pytest>=7.4.0", "pytest-cov>=4.1.0", "httpx>=0.27.0"]
45
  # Interface web FastAPI
46
  web = ["fastapi>=0.111.0", "uvicorn[standard]>=0.29.0", "httpx>=0.27.0"]
47
  # Import HuggingFace Datasets
 
41
 
42
  [project.optional-dependencies]
43
  # Développement et tests
44
+ dev = ["pytest>=7.4.0", "pytest-cov>=4.1.0", "httpx>=0.27.0", "fastapi>=0.111.0", "uvicorn[standard]>=0.29.0"]
45
  # Interface web FastAPI
46
  web = ["fastapi>=0.111.0", "uvicorn[standard]>=0.29.0", "httpx>=0.27.0"]
47
  # Import HuggingFace Datasets