langflow/.github/workflows
Yuqi Tang d0e4e7d1cc
feat: Add template tests (#9083)
* add template tests

* remove files

* adding validate flow build

* add validate endpoint and flow execution

* Update .github/workflows/template-tests.yml

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update src/backend/base/langflow/utils/template_validation.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* [autofix.ci] apply automated fixes

* change workflow running

* add ci

* fix test

* fix test

* delete when push

* fix: Exclude template tests from unit test bundle

Template tests are already run separately in CI via the test-templates job.
This change prevents duplicate execution and eliminates timeout failures
in the unit test suite by excluding slow template execution tests.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Exclude template tests from unit test bundle

Template tests are already run separately in CI via the test-templates job.
This change prevents duplicate execution and eliminates timeout failures
in the unit test suite by excluding slow template execution tests.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Exclude template tests from unit test bundle

Template tests are already run separately in CI via the test-templates job.
This change prevents duplicate execution and eliminates timeout failures
in the unit test suite by excluding slow template execution tests.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Remove remaining merge conflict markers

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Improve validate.py unit tests to eliminate CI failures

Fixed 4 failing tests in test_validate.py:
- test_code_with_syntax_error: Better error message handling for syntax errors
- test_raises_error_for_missing_function: Handle StopIteration along with ValueError
- test_creates_simple_class: Use optional constructor parameter to avoid TypeError
- test_handles_validation_error: Use proper ValidationError constructor from pydantic_core
- test_creates_context_with_langflow_imports: Remove invalid module patching
- test_creates_mock_classes_on_import_failure: Use proper import mocking

All 50 validate tests now pass consistently, improving CI stability.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* enhance: Add comprehensive edge case tests for template_validation.py

Added 6 additional test cases to improve coverage of template_validation.py:
- test_validate_stream_exception: Tests Graph.validate_stream() exception handling
- test_code_validation_other_exceptions: Tests TypeError/KeyError/AttributeError handling
- test_vertices_sorted_without_end_vertex_events: Tests variable usage tracking
- test_vertex_count_tracking: Tests vertex_count increment paths
- test_empty_lines_in_stream: Tests empty line handling in event streams
- test_event_stream_validation_exception: Tests exception handling in _validate_event_stream

These tests target the remaining 7 uncovered lines to maximize coverage percentage.
Total tests: 40 (all passing)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-07-28 18:32:24 +00:00
..
matchers Update linting workflows for frontend and Python code (#2171) 2024-06-14 06:27:48 -07:00
add-labels.yml ci: add issues permission to Manage Labels workflow (#5706) 2025-01-15 16:34:22 -08:00
auto-update.yml bugfix: fix api request custom component (#2470) 2024-07-04 05:05:22 -07:00
ci.yml feat: Add template tests (#9083) 2025-07-28 18:32:24 +00:00
codeflash.yml chore(ci): replace local uv setup action with astral-sh/setup-uv@v6 (#8491) 2025-06-11 18:56:04 +00:00
codeql.yml Bump github/codeql-action from 2 to 3 (#1420) 2024-02-15 10:49:28 -03:00
conventional-labels.yml build(deps):(deps): bump Namchee/conventional-pr from 0.15.5 to 0.15.6 (#6059) 2025-02-03 15:21:04 +00:00
create-release.yml ci: Add GitHub Actions workflow for creating releases (#4587) 2024-11-13 16:11:30 -08:00
deploy-docs-draft.yml docs: Configure Segment (#8996) 2025-07-11 04:39:19 +00:00
deploy_gh-pages.yml docs: Configure Segment (#8996) 2025-07-11 04:39:19 +00:00
docker-build.yml chore(ci): replace local uv setup action with astral-sh/setup-uv@v6 (#8491) 2025-06-11 18:56:04 +00:00
docker_test.yml fix: docker test trigger for poetry is wrong now is uv (#6743) 2025-03-13 00:33:41 +00:00
docs-update-openapi.yml build(deps):(deps): bump actions/checkout from 3 to 4 (#7379) 2025-04-01 14:32:17 +00:00
docs_test.yml chore: use yarn only (#6141) 2025-02-06 17:44:46 +00:00
fetch_docs_notion.yml chore: use yarn only (#6141) 2025-02-06 17:44:46 +00:00
integration_tests.yml chore(ci): replace local uv setup action with astral-sh/setup-uv@v6 (#8491) 2025-06-11 18:56:04 +00:00
jest_test.yml feat: added code coverage reporting (#9081) 2025-07-21 14:03:34 +00:00
js_autofix.yml feat: Move to Biome for linting and formatting (#8997) 2025-07-15 18:46:51 +00:00
lint-js.yml feat: Move to Biome for linting and formatting (#8997) 2025-07-15 18:46:51 +00:00
lint-py.yml chore(ci): replace local uv setup action with astral-sh/setup-uv@v6 (#8491) 2025-06-11 18:56:04 +00:00
nightly_build.yml chore: add required API key secrets for CI workflows (#8877) 2025-07-04 09:56:52 -03:00
py_autofix.yml chore(ci): update workflow to use astral-sh/setup-uv@v6 with Python version (#8508) 2025-06-12 09:30:29 -03:00
python_test.yml feat: added code coverage reporting (#9081) 2025-07-21 14:03:34 +00:00
release.yml chore: update GitHub Actions workflow to inherit secrets (#8922) 2025-07-08 09:59:46 -03:00
release_nightly.yml chore(workflow): comment out Docker build step for langflow-all in nightly release (#8727) 2025-06-26 17:27:03 +00:00
smoke-tests.yml feat: Add smoke tests workflow for PR validation (#9125) 2025-07-28 18:27:05 +00:00
store_pytest_durations.yml chore(ci): replace local uv setup action with astral-sh/setup-uv@v6 (#8491) 2025-06-11 18:56:04 +00:00
style-check-py.yml chore(ci): replace local uv setup action with astral-sh/setup-uv@v6 (#8491) 2025-06-11 18:56:04 +00:00
template-tests.yml feat: Add template tests (#9083) 2025-07-28 18:32:24 +00:00
typescript_test.yml ci: add frontend test execution, reporting, and coverage in workflow (#8815) 2025-07-01 20:38:10 +00:00