Add integration tests and CI workflow - #24
Open
shoebham wants to merge 5 commits into
Open
Conversation
Add an IT suite that verifies required app files exist, starts the Flask server, and submits sample text to confirm sign-word output. Wire it into GitHub Actions with Java/Python/spaCy/torch setup so NLP model changes cannot silently break the running application. Support configurable PORT for CI/local port conflicts and pin torch/spaCy for Python 3.9 compatibility.
Use an optional IT_LIGHT_PIPELINE mode so CI only loads tokenize/pos/lemma instead of the full heavy default stanza stack. Pre-download models in a dedicated workflow step and stream server logs on failure for debugging.
Drain Flask/server logs on a background thread so verbose NLP print output during POST cannot fill the subprocess pipe and hang the server.
main removed the committed LFS jar; download and extract the parser in the workflow instead, and stop requiring it as a tracked repo file.
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.
Summary
tests/integration/test_app_running.py) that verifies required app files exist, starts the Flask server, and submits sample text (Hello world) to confirm sign-word output..github/workflows/integration-tests.yml) that sets up Java/Python/spaCy/torch, downloads Stanza models, fetches the Stanford parser at CI runtime (no longer committed onmain), and runs the IT suite.PORT, optionalIT_LIGHT_PIPELINEfor lighter CI stanza loading (default app behavior unchanged),torch>=2.0,<2.6for stanza/PyTorch compatibility, Dockerfile/spacy pin for Python 3.9.Why
NLP/model changes should not silently break the running application. This CI gate fails the build if the app cannot start or process text.
Test plan
PORT=5055 IT_LIGHT_PIPELINE=1 python tests/integration/test_app_running.pyadd-integration-tests(post-main merge, with runtime Stanford parser download)IT_LIGHT_PIPELINE(default full pipeline unchanged)