[PR #316] [MERGED] CI: migrate end-to-end tests to pytest #388

Closed
opened 2026-02-16 01:17:09 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/run-llama/llama_deploy/pull/316
Author: @masci
Created: 10/14/2024
Status: Merged
Merged: 10/14/2024
Merged by: @masci

Base: mainHead: massi/e2e-pytest


📝 Commits (4)

📊 Changes

16 files changed (+156 additions, -187 deletions)

View changed files

📝 .github/workflows/e2e_test.yml (+7 -7)
e2e_tests/__init__.py (+0 -0)
e2e_tests/basic_streaming/__init__.py (+0 -0)
e2e_tests/basic_streaming/conftest.py (+55 -0)
e2e_tests/basic_streaming/launch_core.py (+0 -14)
e2e_tests/basic_streaming/run.sh (+0 -25)
📝 e2e_tests/basic_streaming/test_run_client.py (+15 -20)
📝 e2e_tests/basic_streaming/workflow.py (+1 -30)
e2e_tests/basic_workflow/__init__.py (+0 -0)
e2e_tests/basic_workflow/conftest.py (+55 -0)
e2e_tests/basic_workflow/launch_core.py (+0 -14)
e2e_tests/basic_workflow/launch_workflow.py (+0 -40)
e2e_tests/basic_workflow/run.sh (+0 -25)
📝 e2e_tests/basic_workflow/test_run_client.py (+7 -12)
e2e_tests/basic_workflow/workflow.py (+11 -0)
📝 pyproject.toml (+5 -0)

📄 Description

end-to-end tests are very handy to debug the code, but the bash logic doesn't play well with subshells (like poetry virtualenvs) and in case of errors I was left with orphan processes holding up the TCP ports needed by the core components. Leaving the core processes running forever doesn't help either, because when you change the workflow code the core components need to be rebooted.

This PR:

  • migrates the logic to pytest using fixtures for start up and tear down of the needed services, using multiprocess to replicate the old logic of running different components in different processes.
  • adds a pytest marker e2e that can be used to select-deselect tests (pytest -m"not e2e") for example.
  • in the future, we might compute coverage from e2e and merge it to the global coverage

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/run-llama/llama_deploy/pull/316 **Author:** [@masci](https://github.com/masci) **Created:** 10/14/2024 **Status:** ✅ Merged **Merged:** 10/14/2024 **Merged by:** [@masci](https://github.com/masci) **Base:** `main` ← **Head:** `massi/e2e-pytest` --- ### 📝 Commits (4) - [`d891d09`](https://github.com/run-llama/llama_deploy/commit/d891d09bb8233cfe5120069727b7bed2590a860b) migrate tests to pytest - [`7fc48e2`](https://github.com/run-llama/llama_deploy/commit/7fc48e20fbfd7ee3ed4926366659e4363b3dff0a) migrate tests to pytest - [`59c86ba`](https://github.com/run-llama/llama_deploy/commit/59c86ba703769d6ea0e5fa7239c75466df95d4b2) add pytest markers - [`94c9987`](https://github.com/run-llama/llama_deploy/commit/94c9987c4fdbeedadefde3039c5dc173d02c12de) use pytest in the CI ### 📊 Changes **16 files changed** (+156 additions, -187 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/e2e_test.yml` (+7 -7) ➕ `e2e_tests/__init__.py` (+0 -0) ➕ `e2e_tests/basic_streaming/__init__.py` (+0 -0) ➕ `e2e_tests/basic_streaming/conftest.py` (+55 -0) ➖ `e2e_tests/basic_streaming/launch_core.py` (+0 -14) ➖ `e2e_tests/basic_streaming/run.sh` (+0 -25) 📝 `e2e_tests/basic_streaming/test_run_client.py` (+15 -20) 📝 `e2e_tests/basic_streaming/workflow.py` (+1 -30) ➕ `e2e_tests/basic_workflow/__init__.py` (+0 -0) ➕ `e2e_tests/basic_workflow/conftest.py` (+55 -0) ➖ `e2e_tests/basic_workflow/launch_core.py` (+0 -14) ➖ `e2e_tests/basic_workflow/launch_workflow.py` (+0 -40) ➖ `e2e_tests/basic_workflow/run.sh` (+0 -25) 📝 `e2e_tests/basic_workflow/test_run_client.py` (+7 -12) ➕ `e2e_tests/basic_workflow/workflow.py` (+11 -0) 📝 `pyproject.toml` (+5 -0) </details> ### 📄 Description end-to-end tests are very handy to debug the code, but the bash logic doesn't play well with subshells (like poetry virtualenvs) and in case of errors I was left with orphan processes holding up the TCP ports needed by the core components. Leaving the core processes running forever doesn't help either, because when you change the workflow code the core components need to be rebooted. This PR: - migrates the logic to pytest using fixtures for start up and tear down of the needed services, using `multiprocess` to replicate the old logic of running different components in different processes. - adds a pytest marker `e2e` that can be used to select-deselect tests (`pytest -m"not e2e"`) for example. - in the future, we might compute coverage from e2e and merge it to the global coverage --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 01:17:09 -05:00
yindo closed this issue 2026-02-16 01:17:09 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/llama_deploy#388