Skip to content

armgit / dify

Public Imported from GitHub
0

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.

fix(ci): harden Playwright browser installs (#40009)

yyhd03312455221
diff --git a/.github/workflows/web-e2e.yml b/.github/workflows/web-e2e.yml
index 1464ef96446..e116f9bbc30 100644
--- a/.github/workflows/web-e2e.yml
+++ b/.github/workflows/web-e2e.yml
@@ -50,9 +50,17 @@ jobs:
working-directory: ./e2e
run: vp run test:unit
- - name: Install Playwright browser
+ - name: Install Playwright browsers for core E2E
+ if: ${{ !inputs.run-external-runtime }}
+ timeout-minutes: 15
+ working-directory: ./e2e
+ run: vp run e2e:install:ci
+
+ - name: Install Chromium for external runtime E2E
+ if: ${{ inputs.run-external-runtime }}
+ timeout-minutes: 15
working-directory: ./e2e
- run: vp run e2e:install
+ run: vp run e2e:install:ci:chromium
- name: Run isolated source-api and built-web Cucumber E2E tests
if: ${{ !inputs.run-external-runtime }}
diff --git a/.github/workflows/web-tests.yml b/.github/workflows/web-tests.yml
index 268766eab58..d4d99f6d090 100644
--- a/.github/workflows/web-tests.yml
+++ b/.github/workflows/web-tests.yml
@@ -91,6 +91,7 @@ jobs:
dify-ui-test:
name: dify-ui Tests
runs-on: depot-ubuntu-24.04-4
+ timeout-minutes: 20
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
defaults:
@@ -108,7 +109,8 @@ jobs:
uses: ./.github/actions/setup-web
- name: Install Chromium for Browser Mode
- run: vp exec playwright install --with-deps chromium
+ timeout-minutes: 15
+ run: vp exec playwright install --with-deps --only-shell chromium
- name: Run dify-ui tests
run: vp test run --project unit --coverage --silent=passed-only
@@ -125,6 +127,7 @@ jobs:
dify-ui-storybook-test:
name: dify-ui Storybook Tests
runs-on: depot-ubuntu-24.04-4
+ timeout-minutes: 20
defaults:
run:
shell: bash
@@ -140,7 +143,8 @@ jobs:
uses: ./.github/actions/setup-web
- name: Install Chromium for Browser Mode
- run: vp exec playwright install --with-deps chromium
+ timeout-minutes: 15
+ run: vp exec playwright install --with-deps --only-shell chromium
- name: Run dify-ui Storybook tests
run: vp run test:storybook
diff --git a/e2e/package.json b/e2e/package.json
index 0af97d6f98c..6b28fa5070b 100644
--- a/e2e/package.json
+++ b/e2e/package.json
@@ -10,6 +10,8 @@
"e2e:full:headed": "tsx ./scripts/run-cucumber.ts --full --headed",
"e2e:headed": "tsx ./scripts/run-cucumber.ts --headed",
"e2e:install": "playwright install --with-deps chromium webkit",
+ "e2e:install:ci": "playwright install --with-deps --only-shell chromium webkit",
+ "e2e:install:ci:chromium": "playwright install --with-deps --only-shell chromium",
"e2e:middleware:down": "tsx ./scripts/setup.ts middleware-down",
"e2e:middleware:up": "tsx ./scripts/setup.ts middleware-up",
"e2e:post-merge": "tsx ./scripts/run-post-merge.ts",