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.

Add GitHub Actions Workflow for Web Tests (#8753)

Hash Brown2ef8b187fad6
diff --git a/.github/workflows/web-tests.yml b/.github/workflows/web-tests.yml
new file mode 100644
index 00000000000..5aee64b8e6d
--- /dev/null
+++ b/.github/workflows/web-tests.yml
@@ -0,0 +1,46 @@
+name: Web Tests
+
+on:
+ pull_request:
+ branches:
+ - main
+ paths:
+ - web/**
+
+concurrency:
+ group: web-tests-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
+
+jobs:
+ test:
+ name: Web Tests
+ runs-on: ubuntu-latest
+ defaults:
+ run:
+ working-directory: ./web
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+
+ - name: Check changed files
+ id: changed-files
+ uses: tj-actions/changed-files@v45
+ with:
+ files: web/**
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ if: steps.changed-files.outputs.any_changed == 'true'
+ with:
+ node-version: 20
+ cache: yarn
+ cache-dependency-path: ./web/package.json
+
+ - name: Install dependencies
+ if: steps.changed-files.outputs.any_changed == 'true'
+ run: yarn install --frozen-lockfile
+
+ - name: Run tests
+ if: steps.changed-files.outputs.any_changed == 'true'
+ run: yarn test