Commit Graph

10 Commits

Author SHA1 Message Date
31d011e3ca chore: Update outdated GitHub Actions versions (#11316)
docs: Update outdated GitHub Actions versions
2026-01-21 18:38:45 +00:00
79d02f201b ci: bump actions/checkout to v6 (#10697) 2025-11-24 12:27:06 +00:00
3d7ad8b088 feat: Adding backend unit tests (#9416)
* Add comprehensive unit tests for Celery modules (celery_app.py and celeryconfig.py)

- Add test_celery_app.py with 10 unit tests covering make_celery function
- Add test_celeryconfig.py with 14 unit tests covering configuration validation
- All tests use proper mocking to avoid external dependencies
- Achieve 100% test pass rate (24/24 tests)
- Improve test coverage from 0% to meaningful levels for core Celery functionality
- Fix linting issues: combine nested with statements and optimize startswith calls

* fix: Resolve linting issues in utility test files

- Remove unused variables and function arguments
- Fix boolean positional arguments in test calls
- Combine nested with statements
- Fix string literals in exception messages
- Add missing newlines at end of files

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

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

* Add comprehensive unit tests for backend modules

This commit adds focused unit test coverage for critical backend components
with meaningful test implementations:

API Layer:
- AsyncStreamingLLMCallbackHandleSIO callback handler tests
- WebSocket streaming, agent actions, and error handling

Components:
- NotifyComponent initialization and configuration tests
- PythonCodeStructuredTool component structure and build tests

Services:
- SocketIOService session management and event handling tests
- S3StorageService AWS operations and error handling tests

Utils:
- async_helpers: AsyncLock, async utilities, and error handling
- component_utils: Component operations and data processing
- compression: Response compression and encoding utilities
- concurrency: Thread management and parallel processing
- lazy_load: Module lazy loading and import optimization
- payload: Data transformation and API payload handling
- schemas: Data validation and schema verification
- version: Version parsing and compatibility checking
- voice_utils: Audio processing and voice feature utilities

All tests include comprehensive mocking, error scenarios, edge cases,
and integration patterns following pytest best practices. Removed
placeholder functions and kept only meaningful test implementations.

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

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

* Fix linting issues in test_data_structure.py and test_util.py

- Fix boolean positional value warnings with noqa comments
- Replace string literals in exceptions with variables
- Combine nested with statements
- Remove unused variables and function arguments
- Use proper parameter names with underscores for unused args

All ruff checks now pass for these test files.

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

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

* merge conflicts

* Add comprehensive unit tests for logic components

- Added test_conditional_router.py with 51 tests for ConditionalRouterComponent
- Added test_data_conditional_router.py with 53 tests for DataConditionalRouterComponent
- Added test_listen.py with 22 tests for ListenComponent
- Added test_notify_component.py with 12 tests for NotifyComponent
- Added test_pass_message.py with 16 tests for PassMessageComponent
- Added test_flow_tool.py with 17 tests for FlowToolComponent

Total: 171 comprehensive tests covering initialization, functionality, edge cases, and error handling
All tests follow clean code practices and achieve high coverage

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

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

* merge conflict

* merge conflict

* fix import errors in unit tests

* fix ruff errors

* [autofix.ci] apply automated fixes

* update path for test_graph in smoke tests

* fix smoke test and failing tests

* modify smoke tests paths

* run lfx tests separately

* fix test_conditional_router.py

* [autofix.ci] apply automated fixes

* fix FlowToolComponent tests

* [autofix.ci] apply automated fixes

* fix: Ensure CLI error output is visible in tests

- Fix error messages not appearing in test output when stdout is redirected
- Temporarily restore stdout before writing error JSON to ensure visibility
- Fix overly broad test condition that matched 'langflow' in file paths
- Only check for actual langflow/lfx import errors, not dependency errors

Fixes 3 failing tests in test_run_starter_projects.py:
- News Aggregator.json
- Pokédex Agent.json
- Price Deal Finder.json

All 736 LFX tests now pass.

* [autofix.ci] apply automated fixes

* Revert "fix: Ensure CLI error output is visible in tests"

This reverts commit 390c669043.

* fix: Correct import paths in test_concurrency.py

* fix test_voice_utils

* fix test_util

* [autofix.ci] apply automated fixes

* fiix test_util

* [autofix.ci] apply automated fixes

* fix test_voice_util.py

* unused args:

* refactor tests to use componentclient

* [autofix.ci] apply automated fixes

* fix ruff errors in test_flow_tool

* skip if api key is not present

* make workflow more robust

* fix mocking in test_celery_app

* [autofix.ci] apply automated fixes

* add celery

* add removed files back

* include once functional

* skip celery tests

* review comments addressed

* remove celery from dependency

* change env var validation

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: himavarshagoutham <himavarshajan17@gmail.com>
Co-authored-by: Himavarsha <40851462+HimavarshaVS@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-10-16 16:46:26 +00:00
a8334c0079 ci: release fixes; add flag to always run full CI during release (#10066)
* Allow skipping lfx for 1.6.1 release

* just remove all lfx for now

* validate deps step

* Make docker builds dependent on CI success

* Wrap release conditionals correctly in {{ }}

* just wrap all conditionals

* Try removing the if in CI job?

* Always run all tests on release

* Try simplifying the runs-on

* Pass ref correctly in ci for testing

* correct input name

* skip lfx tests

* Fail if version is already published

* Fix nightly docker tags

* update node version to 22

* Fix runners

* Fix comm to get version from uv tree

* Add dry run mode

* That is hilarious. Github only allows 10 inputs

* Fix getting version for base manifest

* Add provenance to ensure attestation manifest is not created with platform tag

* Fix nightly version extraction and attestaion manifest

* Use better version extraction snippet

* Fix repo name for nightly-all

* Add back lfx steps

* reduce github inputs to 10 by making docker-ep dependent on main

* Add warning that lfx is not impl yet
2025-10-03 13:56:22 -04:00
7792b7aeaf build(deps):(deps): bump actions/checkout from 4 to 5 (#9646)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-09-18 16:02:36 -03:00
cf863ff4a9 build(deps):(deps): bump actions/setup-python from 4 to 5 (#9285)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-01 11:14:10 -03:00
e3710f7431 build(deps):(deps): bump astral-sh/setup-uv from 3 to 6 (#9286)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-01 11:13:53 -03:00
a1c770911c build(deps):(deps): bump actions/setup-node from 3 to 4 (#9287)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-01 11:13:38 -03:00
b46bf61e84 build(deps):(deps): bump actions/github-script from 6 to 7 (#9288)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-01 11:13:27 -03:00
b7513e5c6f feat: Add smoke tests workflow for PR validation (#9125)
* feat: Add smoke tests workflow for PR validation

- Adds smoke-test label trigger for running tests without API keys
- Runs backend tests excluding api_key_required markers
- Runs full frontend test suite with mocked APIs
- Provides fast feedback (~10-15 min) before lgtm label
- Enables external contributors to validate changes without API costs
- Comments results back to PR automatically

Usage: Add 'smoke-test' label to any PR to trigger

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

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

* fix: Fix YAML indentation in smoke-tests workflow script block

* refactor: Focus smoke tests on critical functionality only

- Run only 10 essential backend test files (version, schema, serialization, etc.)
- Run only frontend unit tests (skip integration/e2e)
- Reduce timeout from 15 to 8 minutes
- Target critical functionality without external dependencies
- Avoid problematic database/API-dependent tests

* fix: Use correct Jest CLI option --testPathPatterns

* add frontend tests

* add tests

* change to essential tests

* fix: Create superuser in test_load_bundles_from_urls test

The test_load_bundles_from_urls test was failing because the load_bundles_from_urls
function expects a superuser to exist in the database, but the test client fixture
sets LANGFLOW_AUTO_LOGIN=false by default, which doesn't create a superuser.

This fix creates a superuser in the test database before calling the function,
resolving the 'Superuser not found in the database' error.

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

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

* add on conditions

* fix: Check PR labels correctly for smoke test trigger

Change condition from github.event.label.name to
github.event.pull_request.labels.*.name to work with all trigger
events (synchronize, opened, etc), not just labeled events.

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

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

* add workdispatch

* remove initial test

* adding timeout minutes

* edit env var

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-07-28 18:27:05 +00:00