e12d5aafbf
删除: FEATURE_SUMMARY.md / QUICK_START.md / STARTUP.md
INTERNAL_DEPLOYMENT_GUIDE.md / INTERNAL_DEPLOYMENT_SUMMARY.md
start-server.bat / start-web.bat / .dockerignore
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
76 lines
1.7 KiB
YAML
76 lines
1.7 KiB
YAML
name: E2E Tests
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
pull_request:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
elasticsearch:
|
|
image: elasticsearch:9.2.1
|
|
env:
|
|
discovery.type: single-node
|
|
xpack.security.enabled: false
|
|
ES_JAVA_OPTS: -Xms512m -Xmx512m
|
|
ports:
|
|
- 9200:9200
|
|
tika:
|
|
image: apache/tika:latest
|
|
ports:
|
|
- 9998:9998
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Build backend
|
|
run: cd server && npx nest build
|
|
|
|
- name: Start backend
|
|
run: cd server && node dist/main.js &
|
|
env:
|
|
JWT_SECRET: test-secret
|
|
OLLAMA_BASE_URL: http://localhost:11434
|
|
|
|
- name: Build frontend
|
|
run: cd web && npx vite build
|
|
|
|
- name: Install Playwright
|
|
run: cd web/e2e && npm install && npx playwright install chromium
|
|
|
|
- name: Serve frontend
|
|
run: cd web/e2e && node dev-server.js &
|
|
env:
|
|
PORT: 13001
|
|
|
|
- name: Wait for services
|
|
run: sleep 15
|
|
|
|
- name: Run E2E tests
|
|
run: cd web/e2e && npx playwright test --reporter=html
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: playwright-report
|
|
path: web/e2e-report/
|
|
retention-days: 7
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
if: failure()
|
|
with:
|
|
name: test-results
|
|
path: web/e2e/test-results/
|
|
retention-days: 14
|