Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
ci: simplify test workflow execution (#39318)
WH-209975f7069541fb
diff --git a/.github/workflows/api-tests.yml b/.github/workflows/api-tests.ymlindex 50ce5deef99..e8bcd20cf66 100644--- a/.github/workflows/api-tests.yml+++ b/.github/workflows/api-tests.yml@@ -47,9 +47,6 @@ jobs:- name: Install dependenciesrun: uv sync --project api --dev- - name: Run dify config tests- run: uv run --project api pytest api/tests/unit_tests/configs/test_env_consistency.py-- name: Run Unit Testsrun: |uv run --project api pytest \diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.ymlindex 72a53a9a193..18542a1f18d 100644--- a/.github/workflows/main-ci.yml+++ b/.github/workflows/main-ci.yml@@ -81,7 +81,6 @@ jobs:- '.npmrc'- '.nvmrc'- '.github/workflows/cli-tests.yml'- - '.github/workflows/cli-docker-build.yml'- '.github/actions/setup-web/**'web:- 'web/**'diff --git a/.github/workflows/web-e2e.yml b/.github/workflows/web-e2e.ymlindex a1e35c03b09..d7cd2657d58 100644--- a/.github/workflows/web-e2e.yml+++ b/.github/workflows/web-e2e.yml@@ -135,16 +135,6 @@ jobs:exit 1fi- if [[ -d cucumber-report ]]; then- rm -rf cucumber-report-non-external- mv cucumber-report cucumber-report-non-external- fi-- if [[ -d .logs ]]; then- rm -rf .logs-non-external- mv .logs .logs-non-external- fi-teardown_external_runtime() {local run_status=$?trap - EXITdiff --git a/.github/workflows/web-tests.yml b/.github/workflows/web-tests.ymlindex 51be02c259c..ba61f53df7d 100644--- a/.github/workflows/web-tests.yml+++ b/.github/workflows/web-tests.yml@@ -17,8 +17,6 @@ jobs:test:name: Web Tests (${{ matrix.shardIndex }}/${{ matrix.shardTotal }})runs-on: depot-ubuntu-24.04-4- env:- VITEST_COVERAGE_SCOPE: app-componentsstrategy:fail-fast: falsematrix:diff --git a/Makefile b/Makefileindex 07199d4e16a..79226a6157a 100644--- a/Makefile+++ b/Makefile@@ -107,6 +107,7 @@ test:echo "Target: $(TARGET_TESTS)"; \uv run --project api --dev pytest $(TARGET_TESTS); \else \+ set -e; \echo "Running backend unit tests"; \uv run --project api --dev pytest -p no:benchmark --timeout "$${PYTEST_TIMEOUT:-20}" -n auto \api/tests/unit_tests \@@ -124,6 +125,7 @@ test-all:echo "Target: $(TARGET_TESTS)"; \uv run --project api --dev pytest $(TARGET_TESTS); \else \+ set -e; \echo "Running backend unit tests"; \uv run --project api --dev pytest -p no:benchmark --timeout "$${PYTEST_TIMEOUT:-20}" -n auto \api/tests/unit_tests \diff --git a/api/tests/unit_tests/configs/test_dify_config.py b/api/tests/unit_tests/configs/test_dify_config.pyindex 8807de47ff6..49934cf4837 100644--- a/api/tests/unit_tests/configs/test_dify_config.py+++ b/api/tests/unit_tests/configs/test_dify_config.py@@ -8,8 +8,13 @@ from yarl import URLfrom configs.app_config import DifyConfig+def _clear_environment(monkeypatch: pytest.MonkeyPatch) -> None:+ for name in tuple(os.environ):+ monkeypatch.delenv(name)++def _set_basic_config_env(monkeypatch: pytest.MonkeyPatch) -> None:- os.environ.clear()+ _clear_environment(monkeypatch)monkeypatch.setenv("CONSOLE_API_URL", "https://example.com")monkeypatch.setenv("CONSOLE_WEB_URL", "https://example.com")monkeypatch.setenv("DB_TYPE", "postgresql")@@ -51,7 +56,7 @@ def test_dify_config_preserves_explicit_secret_key(def test_dify_config(monkeypatch: pytest.MonkeyPatch):# clear system environment variables- os.environ.clear()+ _clear_environment(monkeypatch)# Set environment variables using monkeypatchmonkeypatch.setenv("CONSOLE_API_URL", "https://example.com")@@ -140,7 +145,7 @@ def test_new_user_default_models_reject_duplicate_model_types(monkeypatch: pytesdef test_http_timeout_defaults(monkeypatch: pytest.MonkeyPatch):"""Test that HTTP timeout defaults are correctly set"""# clear system environment variables- os.environ.clear()+ _clear_environment(monkeypatch)# Set minimal required env varsmonkeypatch.setenv("DB_TYPE", "postgresql")@@ -160,7 +165,7 @@ def test_http_timeout_defaults(monkeypatch: pytest.MonkeyPatch):def test_internal_files_url_falls_back_to_server_console_api_url(monkeypatch: pytest.MonkeyPatch):- os.environ.clear()+ _clear_environment(monkeypatch)monkeypatch.setenv("SERVER_CONSOLE_API_URL", "http://api:5001")config = DifyConfig(_env_file=None)@@ -169,7 +174,7 @@ def test_internal_files_url_falls_back_to_server_console_api_url(monkeypatch: pydef test_internal_files_url_prefers_explicit_value(monkeypatch: pytest.MonkeyPatch):- os.environ.clear()+ _clear_environment(monkeypatch)monkeypatch.setenv("INTERNAL_FILES_URL", "http://files-internal:5001")monkeypatch.setenv("SERVER_CONSOLE_API_URL", "http://api:5001")@@ -183,7 +188,7 @@ def test_internal_files_url_prefers_explicit_value(monkeypatch: pytest.MonkeyPatdef test_flask_configs(monkeypatch: pytest.MonkeyPatch):flask_app = Flask("app")# clear system environment variables- os.environ.clear()+ _clear_environment(monkeypatch)# Set environment variables using monkeypatchmonkeypatch.setenv("CONSOLE_API_URL", "https://example.com")@@ -290,7 +295,7 @@ def test_db_session_timezone_override_can_disable_app_level_timezone_injection(mdef test_pubsub_redis_url_default(monkeypatch: pytest.MonkeyPatch):- os.environ.clear()+ _clear_environment(monkeypatch)monkeypatch.setenv("CONSOLE_API_URL", "https://example.com")monkeypatch.setenv("CONSOLE_WEB_URL", "https://example.com")@@ -313,7 +318,7 @@ def test_pubsub_redis_url_default(monkeypatch: pytest.MonkeyPatch):def test_pubsub_redis_url_override(monkeypatch: pytest.MonkeyPatch):- os.environ.clear()+ _clear_environment(monkeypatch)monkeypatch.setenv("CONSOLE_API_URL", "https://example.com")monkeypatch.setenv("CONSOLE_WEB_URL", "https://example.com")@@ -330,7 +335,7 @@ def test_pubsub_redis_url_override(monkeypatch: pytest.MonkeyPatch):def test_pubsub_redis_url_required_when_default_unavailable(monkeypatch: pytest.MonkeyPatch):- os.environ.clear()+ _clear_environment(monkeypatch)monkeypatch.setenv("CONSOLE_API_URL", "https://example.com")monkeypatch.setenv("CONSOLE_WEB_URL", "https://example.com")@@ -346,7 +351,7 @@ def test_pubsub_redis_url_required_when_default_unavailable(monkeypatch: pytest.def test_dify_config_exposes_redis_key_prefix_default(monkeypatch: pytest.MonkeyPatch):- os.environ.clear()+ _clear_environment(monkeypatch)monkeypatch.setenv("CONSOLE_API_URL", "https://example.com")monkeypatch.setenv("CONSOLE_WEB_URL", "https://example.com")@@ -363,7 +368,7 @@ def test_dify_config_exposes_redis_key_prefix_default(monkeypatch: pytest.Monkeydef test_dify_config_reads_redis_key_prefix_from_env(monkeypatch: pytest.MonkeyPatch):- os.environ.clear()+ _clear_environment(monkeypatch)monkeypatch.setenv("CONSOLE_API_URL", "https://example.com")monkeypatch.setenv("CONSOLE_WEB_URL", "https://example.com")@@ -415,7 +420,7 @@ def test_celery_broker_url_with_special_chars_password(from kombu.utils.url import parse_url# clear system environment variables- os.environ.clear()+ _clear_environment(monkeypatch)# Set up basic required environment variables (following existing pattern)monkeypatch.setenv("CONSOLE_API_URL", "https://example.com")