Add minimal pytest workflow - #35
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - name: Install pytest (only) | ||
| run: | | ||
| python -m pip install -U pip wheel | ||
| pip install pytest pytest-cov || true | ||
| # Try to install the project if it's installable; ignore failure to keep tests running | ||
| pip install -e . || true | ||
|
|
||
| - name: Environment summary | ||
| run: | | ||
| python --version | ||
| which python | ||
| echo "PYTHONPATH before: ${PYTHONPATH:-<unset>}" | ||
| ls -la | ||
| echo "Packages:" | ||
| python - <<'PY' | ||
| import sys, pkgutil | ||
| print("installed sample:", [m.name for m in pkgutil.iter_modules()][:20]) | ||
| PY | ||
| python -m pip install -U pip | ||
| pip install pytest |
There was a problem hiding this comment.
Install project dependencies before running pytest
This workflow now installs only pytest, but the test suite imports third‑party packages such as fastapi and httpx (e.g. tests/test_version_identity.py). On a fresh GitHub runner these packages are not present, so the job will raise ModuleNotFoundError before any tests execute. Installing the project’s runtime requirements (for example via pip install -e . or pip install -r requirements.txt) is needed for the CI run to succeed.
Useful? React with 👍 / 👎.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68f96aafd6ac8328b96e7b804535cc48