|
23 | 23 | options: [smoke, full] |
24 | 24 |
|
25 | 25 | # ── Suite on/off ──────────────────────────────────────────────────────── |
26 | | - suite_config: |
27 | | - description: "config suite" |
28 | | - type: boolean |
29 | | - default: false |
30 | 26 | suite_framework_output_error: |
31 | 27 | description: "framework + output + error-handling suites" |
32 | 28 | type: boolean |
|
60 | 56 |
|
61 | 57 | jobs: |
62 | 58 |
|
63 | | -# ════════════════════════════════════════════════════════════════════════════ |
64 | | -# 0. PROVISION — mint token + import DSL fixtures (runs once, outputs IDs) |
65 | | -# ════════════════════════════════════════════════════════════════════════════ |
66 | | - provision: |
67 | | - name: "Provision: mint token + DSL apps" |
68 | | - runs-on: ubuntu-latest |
69 | | - timeout-minutes: 10 |
70 | | - outputs: |
71 | | - token: ${{ steps.out.outputs.DIFY_E2E_TOKEN }} |
72 | | - workspace_id: ${{ steps.out.outputs.DIFY_E2E_WORKSPACE_ID }} |
73 | | - workspace_name: ${{ steps.out.outputs.DIFY_E2E_WORKSPACE_NAME }} |
74 | | - ws2_id: ${{ steps.out.outputs.DIFY_E2E_WS2_ID }} |
75 | | - chat_app_id: ${{ steps.out.outputs.DIFY_E2E_CHAT_APP_ID }} |
76 | | - workflow_app_id: ${{ steps.out.outputs.DIFY_E2E_WORKFLOW_APP_ID }} |
77 | | - file_app_id: ${{ steps.out.outputs.DIFY_E2E_FILE_APP_ID }} |
78 | | - file_chat_app_id: ${{ steps.out.outputs.DIFY_E2E_FILE_CHAT_APP_ID }} |
79 | | - hitl_app_id: ${{ steps.out.outputs.DIFY_E2E_HITL_APP_ID }} |
80 | | - hitl_external_app_id: ${{ steps.out.outputs.DIFY_E2E_HITL_EXTERNAL_APP_ID }} |
81 | | - hitl_single_action_app_id: ${{ steps.out.outputs.DIFY_E2E_HITL_SINGLE_ACTION_APP_ID }} |
82 | | - hitl_multi_node_app_id: ${{ steps.out.outputs.DIFY_E2E_HITL_MULTI_NODE_APP_ID }} |
83 | | - ws2_app_id: ${{ steps.out.outputs.DIFY_E2E_WS2_APP_ID }} |
84 | | - |
85 | | - steps: |
86 | | - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4 |
87 | | - with: |
88 | | - ref: ${{ inputs.cli_ref || github.ref }} |
89 | | - persist-credentials: false |
90 | | - |
91 | | - - uses: oven-sh/setup-bun@v2 |
92 | | - with: |
93 | | - bun-version: latest |
94 | | - |
95 | | - - uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 |
96 | | - with: |
97 | | - package_json_field: packageManager |
98 | | - run_install: false |
99 | | - |
100 | | - - name: Install CLI dependencies |
101 | | - working-directory: cli |
102 | | - run: pnpm install --frozen-lockfile |
103 | | - |
104 | | - - name: Mint token & provision apps |
105 | | - id: out |
106 | | - working-directory: cli |
107 | | - env: |
108 | | - DIFY_E2E_HOST: ${{ secrets.DIFY_E2E_HOST }} |
109 | | - DIFY_E2E_EMAIL: ${{ secrets.DIFY_E2E_EMAIL }} |
110 | | - DIFY_E2E_PASSWORD: ${{ secrets.DIFY_E2E_PASSWORD }} |
111 | | - DIFY_E2E_TOKEN: ${{ secrets.DIFY_E2E_TOKEN }} |
112 | | - DIFY_E2E_EDITION: ${{ inputs.edition || 'ee' }} |
113 | | - run: bun scripts/e2e-provision.ts |
114 | | - |
115 | | -# ════════════════════════════════════════════════════════════════════════════ |
116 | | -# Shared step templates (via YAML anchors) |
117 | | -# ════════════════════════════════════════════════════════════════════════════ |
118 | | - |
119 | | -# ── Reusable checkout + install ────────────────────────────────────────────── |
120 | | -# (repeated per job because GitHub Actions doesn't support sharing workspace) |
121 | | - |
122 | | -# ════════════════════════════════════════════════════════════════════════════ |
123 | | -# 1-A. LOCAL suites — no staging server, no token needed |
124 | | -# ════════════════════════════════════════════════════════════════════════════ |
125 | | - suite-local: |
126 | | - name: "Suite: config + help (local, no auth)" |
127 | | - if: ${{ inputs.suite_config == true }} |
128 | | - runs-on: ubuntu-latest |
129 | | - timeout-minutes: 10 |
130 | | - defaults: |
131 | | - run: |
132 | | - working-directory: cli |
133 | | - shell: bash |
134 | | - |
135 | | - steps: |
136 | | - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4 |
137 | | - with: |
138 | | - ref: ${{ inputs.cli_ref || github.ref }} |
139 | | - persist-credentials: false |
140 | | - |
141 | | - - uses: ./.github/actions/setup-web |
142 | | - - uses: oven-sh/setup-bun@v2 |
143 | | - with: { bun-version: latest } |
144 | | - - uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 |
145 | | - with: { package_json_field: packageManager, run_install: false } |
146 | | - - run: pnpm install --frozen-lockfile |
147 | | - - run: pnpm tree:gen |
148 | | - |
149 | | - - name: Run config + help (DIFY_E2E_MODE=local) |
150 | | - env: |
151 | | - DIFY_E2E_MODE: local |
152 | | - DIFY_E2E_INCLUDE: "test/e2e/suites/framework/help.e2e.ts" |
153 | | - run: | |
154 | | - if [ "${{ inputs.test_scope }}" = "smoke" ]; then |
155 | | - pnpm test:e2e -- -t "\[P0\]" |
156 | | - else |
157 | | - pnpm test:e2e |
158 | | - fi |
159 | | -
|
160 | 59 | # ════════════════════════════════════════════════════════════════════════════ |
161 | 60 | # 1-B. framework + output + error-handling (parallel with run/discovery) |
162 | 61 | # ════════════════════════════════════════════════════════════════════════════ |
|
196 | 95 | DIFY_E2E_WORKSPACE_NAME: ${{ needs.provision.outputs.workspace_name }} |
197 | 96 | DIFY_E2E_CHAT_APP_ID: ${{ needs.provision.outputs.chat_app_id }} |
198 | 97 | DIFY_E2E_WORKFLOW_APP_ID: ${{ needs.provision.outputs.workflow_app_id }} |
199 | | - DIFY_E2E_INCLUDE: "test/e2e/suites/framework/global-flags.e2e.ts,test/e2e/suites/output/**/*.e2e.ts,test/e2e/suites/error-handling/**/*.e2e.ts" |
| 98 | + DIFY_E2E_INCLUDE: "test/e2e/suites/framework/**/*.e2e.ts,test/e2e/suites/output/**/*.e2e.ts,test/e2e/suites/error-handling/**/*.e2e.ts" |
200 | 99 | run: | |
201 | 100 | if [ "${{ inputs.test_scope }}" = "smoke" ]; then |
202 | 101 | pnpm test:e2e -- -t "\[P0\]" |
@@ -386,7 +285,6 @@ jobs: |
386 | 285 | if: ${{ inputs.suite_auth == true || inputs.suite_agent == true }} |
387 | 286 | needs: |
388 | 287 | - provision |
389 | | - - suite-local |
390 | 288 | - suite-framework-output-error |
391 | 289 | - suite-discovery |
392 | 290 | - suite-run |
|
0 commit comments