Add offline-safe GitHub Actions CI for backend test reliability (Bepo v0.4.1)#9
Merged
Merged
Conversation
Agent-Logs-Url: https://github.com/enlorik/Bepo/sessions/e07d1f46-2268-49fc-bca5-5f56a2fdaebb Co-authored-by: enlorik <[email protected]>
Agent-Logs-Url: https://github.com/enlorik/Bepo/sessions/e07d1f46-2268-49fc-bca5-5f56a2fdaebb Co-authored-by: enlorik <[email protected]>
Copilot created this pull request from a session on behalf of
enlorik
May 13, 2026 11:58
View session
There was a problem hiding this comment.
Pull request overview
This PR introduces an offline-safe GitHub Actions CI workflow to automatically run the backend test suite on PRs and pushes to main, while hardening tests against accidental Hugging Face/Transformers model downloads.
Changes:
- Added a minimal GitHub Actions workflow that installs dependencies and runs
python -m pytest tests/ -vwith offline HF/Transformers env vars set. - Added
requirements-dev.txtfor test dependencies. - Updated tests and README to reinforce offline/no-model-download and isolated temp DB/filesystem behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
tests/test_api.py |
Sets TRANSFORMERS_OFFLINE/HF_HUB_OFFLINE in the autouse fixture to defensively prevent model downloads during tests. |
requirements-dev.txt |
Adds dev-only test dependencies (pytest, httpx). |
README.md |
Updates test instructions and documents CI behavior + offline guardrails. |
.github/workflows/ci.yml |
Adds CI workflow to run pytest on PRs and pushes to main with offline environment variables. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -252,11 +252,16 @@ Returns API version information and a list of available endpoints. | |||
| ## Running Tests | |||
|
|
|||
| ```bash | |||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a minimal GitHub Actions pipeline so backend tests run automatically on PRs and pushes to
main, with explicit safeguards to prevent CLIP/Hugging Face model downloads in CI. It also tightens test/runtime documentation and dependency setup around isolated, local-state-independent test execution.CI pipeline (
.github/workflows/ci.yml)pull_requestpushtomainubuntu-latestwith Python3.11python -m pytest tests/ -vcontents: read)Offline model-download guardrails
TRANSFORMERS_OFFLINE=1HF_HUB_OFFLINE=1Test isolation hardening
tests/test_api.pyfixture now also sets offline env vars defensivelyDB_PATHand tempIMAGES_DIR, independent of localmemories.db,images/, GUI, or a pre-running backend serverDependency and docs alignment
requirements-dev.txtwithpytestandhttpx