Run Python extension tests (pytest) in CI
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 50/100
Direzione di ricerca
Start with the R testthat step in the simple-extensions job of .github/workflows/extensions.yml and copy its conditional pattern for a Python step. Read each extension's manifest.json for the Python version and its requirements.txt for dependencies, then check that pytest passes in content-health-monitor and bundle-storage-report. Done means the step runs only when Python tests exist and a failure blocks packaging. The open question about a shared action needs a maintainer decision first.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Python extensions can ship pytest tests, but no workflow runs them, so a failing test never blocks packaging or release.
The simple-extensions job in .github/workflows/extensions.yml already runs R testthat tests when an extension has tests/testthat/*.R. It has no matching step for Python. The custom workflows (usage-metrics-dashboard, runtime-version-scanner, and others) run only R tests too.
Two extensions currently have Python tests that CI never runs:
content-health-monitor:test_content_health_utils.pyandtest_integration.py, which mock the Connect client.bundle-storage-report(#489):test_storage_utils.py.
Proposal
Add a step to simple-extensions, next to the R tests, that runs only when the extension has Python tests (for example hashFiles('extensions/<ext>/test_*.py', 'extensions/<ext>/tests/**/*.py') != ''). It would:
- Set up the Python version from the extension's
manifest.json. - Install the extension's
requirements.txtpluspytest, so tests run against the versions the extension ships with. - Run
pytestin the extension directory, so a failure stops packaging and release, as the R step does.
These tests need no Connect server, so they belong in this job rather than in the integration suite. The integration suite only checks that each extension deploys (integration/tests/posit/connect/test_deployments.py).
Open question
Should the custom workflows get the same step, or should a shared action handle it for both?
- Lingua principale
- R
- Stelle
- 10
- Fork
- 8
- Merge medio
- 9h 43m
- PR unite (30g)
- 2
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di posit-dev/connect-extensions
-
Bundle storage report with bulk retention-limit management (pins focus)Forse già presa @kellobri l’ha presa 2 giorni fa. Apertaenhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
posit-dev/connect-extensions#488 · 1 commento ·
-
enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
posit-dev/connect-extensions#484 ·
-
documentation
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
posit-dev/connect-extensions#483 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
posit-dev/connect-extensions#477 · 1 commento ·
-
mcp
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
posit-dev/connect-extensions#467 ·
Tutte le issue di posit-dev/connect-extensions
Issue simili
-
Remove {watcher} importApertacould enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
The-Strategy-Unit/nhp_inputs#758 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
paul-buerkner/brms#1985 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
[R] abandon_ship() looks up `call` with an inheriting get(), so its "no call" guard never firesForse già presa Una pull request collegata a questa issue è aperta o già unita. ApertaComponent: R
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
rubenarslan/formr#60 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100