Commit Graph
431 Commits
Author SHA1 Message Date
gigglewang0417 1fd7cf4aca fix(ci): use != false for suite toggles to handle empty GHA boolean inputs
workflow_dispatch boolean inputs in GitHub Actions do not apply default
values when triggered via gh CLI without explicit --field flags.
They arrive as empty string ('') which does not equal true, causing all
if: inputs.suite_XXX == true conditions to evaluate as false.

Fix: change all suite if conditions from == true to != 'false' so that
both explicit true and the default empty string are treated as enabled.
2026-06-09 10:15:34 +08:00
gigglewang0417 11e464ddae fix(ci): restore provision job accidentally deleted with suite-local 2026-06-08 14:33:28 +08:00
gigglewang0417 33af0f55c2 ci: enable agent suite by default 2026-06-08 14:00:42 +08:00
gigglewang0417 ada1da1781 ci: remove suite_config input and suite-local job (config suite deleted) 2026-06-08 11:00:32 +08:00
gigglewang0417 777ba22431 ci: enable framework+output+error-handling and auth suites by default 2026-06-08 10:44:20 +08:00
gigglewang0417 0d66bbefc3 test(e2e): remove config suite (feature not yet implemented) 2026-06-08 10:41:04 +08:00
gigglewang0417 7306fa4c50 fix(ci): move DIFY_E2E_INCLUDE to job-level env (step-level caused duplicate env key) 2026-06-08 10:33:34 +08:00
gigglewang0417 fe91ccfe5d fix(ci): use DIFY_E2E_INCLUDE env to override vitest include list per job
Previously, passing positional file args to pnpm test:e2e had no effect
because vitest.e2e.config.ts include list took precedence, causing every
parallel job to run the full suite and hit the 20-minute timeout.

vitest.e2e.config.ts:
- Add DIFY_E2E_INCLUDE env var (comma-separated globs, replaces SINGLE_FILE)
- DIFY_E2E_SINGLE_FILE kept as deprecated alias for back-compat
- When set, include list is built from DIFY_E2E_INCLUDE instead of the
  hardcoded full-suite list

cli-e2e.yml:
- Every suite job now sets DIFY_E2E_INCLUDE to target its own files
- Remove positional file args (they were silently ignored by vitest config)
- Standardise smoke filter: FILTER_ARGS array -> inline -t arg
- timeout-minutes: discovery 20->15, run/* 20->35 (CI ~5x slower)
2026-06-08 10:32:06 +08:00
gigglewang0417 2d22d87970 fix(ci): replace unsupported ternary expressions in workflow run steps 2026-06-07 16:37:23 +08:00
gigglewang0417 56ba8f421a ci(cli-e2e): parallel job workflow + provision script + test fixes
Workflow (cli-e2e.yml):
- Plan B: split into parallel jobs after a shared provision step
- provision job: mints token + provisions DSL apps, outputs IDs to downstream jobs
- suite-run: matrix of 5 parallel jobs (basic/streaming/conversation/file/hitl)
- suite-last: serial, waits for all parallel jobs; runs use/devices/logout/agent
- Add DIFY_E2E_NO_KEYRING=1 globally (Linux CI has no keychain)
- timeout-minutes: 30 → 60; smoke filter: --testNamePattern → -t

New script (cli/scripts/e2e-provision.ts):
- Standalone Bun script: login + mint token + discover workspaces + provision apps
- Outputs to GITHUB_OUTPUT + .provision-output.json

Test fixes:
- run-app-streaming: DIFY_E2E_NO_KEYRING=1 in spawn-based tests
- run-app-basic: fix cache test (DIFY_CACHE_DIR + app-info.yml path)
- run-app-conversation/file: SSO injectAuth uses new hosts.yml format
- get-app-list: tag filter auto-provisions e2e-test tag
- vitest.e2e.config.ts: DIFY_E2E_SINGLE_FILE override + agent suite
2026-06-07 16:35:31 +08:00
gigglewang0417 3133b196ad Merge remote-tracking branch 'origin/main' into feat/cli-e2e-test-suite
# Conflicts:
#	cli/.gitignore
2026-06-04 17:48:38 +08:00
Asuka MinatoandGitHub f591da7865 ci: ruff cover agent (#36949) 2026-06-02 11:40:19 +00:00
gigglewang0417 363aabee73 ci(cli-e2e): auto-retry failed tests via VITEST_RETRY=2
vitest.e2e.config.ts:
  Read VITEST_RETRY env var (default 0) to set the global retry count.
  Local runs keep retry=0; per-test withRetry() stays the precise tool
  for known flaky paths. CI sets retry=2 to handle transient server 500s.

cli-e2e.yml:
  Pass VITEST_RETRY=2 to the test step so each failing test gets up to
  2 automatic retries before being reported as a failure.
2026-06-02 10:14:07 +08:00
gigglewang0417 748d790a0d fix(cli-e2e): use find instead of shell glob to collect test files
Bash array elements containing ** globs are not expanded when passed
as arguments to pnpm, causing 'No test files found'. Replace with
process substitution + find to reliably collect .e2e.ts paths.
2026-06-02 09:55:15 +08:00
gigglewang0417 0f52c5e6f3 ci(cli-e2e): parameterize suites with per-suite boolean toggles
Replace fixed 'smoke/full' choice with individual boolean inputs:
  suite_discovery  (default: true)
  suite_run        (default: true)
  suite_auth       (default: false)
  suite_config     (default: false)

Combined with a 'test_scope' choice (smoke=[P0] / full=all cases).

This allows any combination of suites to be run in a single dispatch
without breaking up into multiple workflows.

Default behaviour (no inputs): discovery + run, all cases.
2026-06-02 09:49:14 +08:00
Yunlu WenandGitHub 400befc451 Merge branch 'main' into feat/cli-e2e-test-suite 2026-06-01 15:22:42 +08:00
非法操作andGitHub ae538ced47 chore: using single SSH_SCRIPT for saas dev (#36827) 2026-05-29 10:07:15 +00:00
Yunlu WenandGitHub 4939a9c33d refactor: add ts common style check for web and cli (#36823) 2026-05-29 09:26:32 +00:00
非法操作andGitHub ce276573a8 chore: deploy saas dev workflow (#36819) 2026-05-29 08:30:55 +00:00
-LAN-andGitHub 825fb9cb89 chore(codeowners): add Riskey for service API docs (#36731) 2026-05-28 05:06:12 +00:00
gigglewang0417 e0e0ae372a ci(cli-e2e): remove Dify stack build, read env from Secrets
Drop the middleware/API/provision steps that spun up a full Dify
Docker stack. All DIFY_E2E_* vars are now injected from repository
Secrets so the workflow targets an existing staging server instead
of building one on every run.

Also removed: dify_version input (no longer needed), Dump Dify logs
step (no Docker stack to inspect). Timeout reduced from 45→30 min.
2026-05-27 17:30:02 +08:00
gigglewang0417 bc3b1c0c81 fix(ci): fix pnpm version conflict in cli-e2e workflow; refine e2e suite
- Override pnpm to v11 (packageManager field) before CLI install step to
  resolve ERR_PNPM_BAD_PM_VERSION conflict with setup-web's pnpm@9
- Add per-suite dedicated tokens (logoutToken / devicesToken) in global-setup
  via device flow to prevent token cross-contamination between suites
- Translate all Chinese comments and test names to English across e2e suites
- Fix injectAuth: add tokenId field so devices revoke correctly detects selfHit
- Fix HITL test: read action id dynamically from pause response instead of
  hardcoding 'submit'
2026-05-27 17:23:46 +08:00
Yunlu WenandGitHub a8d380bcaf refactor(cli): add kvstore and platform interface (#36687) 2026-05-27 05:30:12 +00:00
gigglewang0417 b734afd609 ci: add GitHub Actions workflow for CLI E2E tests
Triggers on pull_request when cli/** files change.
Spins up a full Dify stack via docker compose, provisions
an admin account + test apps, then runs the E2E smoke suite
(P0 cases only for CI speed).
2026-05-27 11:09:19 +08:00
Yunlu WenandGitHub 0dad426101 chore: add dependabot to lts branch (#36424) 2026-05-26 07:08:08 +00:00
Yunlu WenGitHubGareArcCopilot Autofix powered by AIautofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>L1nSn0wClaude Opus 4.7gigglewangCopilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>Xiyuan Chen
a728e0ac69 feat: adding dify cli (#36348)
Co-authored-by: GareArc <garethcxy@dify.ai>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: L1nSn0w <l1nsn0w@qq.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: gigglewang <gigglewang@dify.ai>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Xiyuan Chen <52963600+GareArc@users.noreply.github.com>
2026-05-26 01:12:36 +00:00
chaririandGitHub ea5e487d3c fix(api): stop returning 204 with response body and add CI check (#36489) 2026-05-21 16:20:34 +00:00
chaririandGitHub 1b4356b66a fix(ci): bad pyinfra type coverage report comments (#36482) 2026-05-21 12:08:24 +00:00
yyhandGitHub be8627233d ci: show web test shard failures (#36436) 2026-05-20 08:03:15 +00:00
-LAN-andGitHub 7cb14cb4cc chore(codeowners): assign trigger scheduler ownership (#36430) 2026-05-20 06:48:34 +00:00
Stephen ZhouandGitHub 8f197c5a0a build: fix api docker build (#36423) 2026-05-20 03:48:18 +00:00
Stephen ZhouandGitHub f52491e2c1 chore: update deps (#36413) 2026-05-20 01:48:30 +00:00
-LAN-andGitHub 809f513ccb chore(codeowners): update plugin ownership (#36394) 2026-05-19 19:25:49 +08:00
-LAN-andGitHub 34a89416f7 test(api): manage backend pytest services natively (#36235) 2026-05-19 07:52:15 +00:00
-LAN-andGitHub 75d7fc0526 ci: add hotfix cherry-pick provenance check (#36340) 2026-05-18 10:03:56 +00:00
yyhandGitHub 969760364d ci: ensure pnpm is available in setup-web action (#36315) 2026-05-18 06:55:38 +00:00
Stephen ZhouandGitHub 1925d58369 chore: generate contract in ci (#36286) 2026-05-18 03:13:40 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
a2ee151e48 chore(deps): bump the github-actions-dependencies group with 2 updates (#36009)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-11 03:52:38 +00:00
Asuka MinatoandGitHub 65c36a51ef ci: update comment (#35968) 2026-05-09 07:53:42 +00:00
Asuka MinatoGitHubautofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>WH-2099
38a419d073 ci: auto gen api doc and download link (#35919)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: WH-2099 <wh2099@pm.me>
2026-05-09 03:01:47 +00:00
48d27e250b refactor: split docker-compose env config into separate files (#31586)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: -LAN- <laipz8200@outlook.com>
2026-05-08 15:36:20 +00:00
Stephen ZhouandGitHub 76a7f5f4b9 chore: update deps (#35812) 2026-05-08 01:32:14 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
cd9daef564 chore(deps): bump anthropics/claude-code-action from 1.0.110 to 1.0.111 in the github-actions-dependencies group (#35781)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-04 07:33:38 +00:00
Asuka MinatoandGitHub 955c25589d ci: Remove API contracts generation step from autofix workflow (#35768) 2026-05-02 09:30:54 +00:00
Stephen ZhouandGitHub 574d5865f4 chore: generate contact from api (#35748) 2026-04-30 11:34:27 +00:00
afbc30c9ed chore: update to pnpm 11 (#35673)
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
2026-04-29 06:45:11 +00:00
yyhandGitHub 25973c7d77 chore: update eslint suppressions codeowner (#35679) 2026-04-29 06:35:02 +00:00
L1nSn0wandGitHub b8dea56198 fix(ci): wait for mysql to accept queries before db migration (#35631) 2026-04-28 06:53:10 +00:00
yyhandGitHub e2becd6746 test: cover shared workflow app run (#35634) 2026-04-28 06:29:48 +00:00
yyhandGitHub 3a28868a6c ci: upgrade web test runners (#35593) 2026-04-27 06:10:43 +00:00