|
193
|
52
|
6
|
5
|
c8adeb7142f7f1b57a10bfffc3de856524997227
|
0
|
集成测试(API + DB + Events)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
integration-tests:
name: 集成测试(API + DB + Events)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 设置测试环境变量
run: |
cd backend
cat > .env.test <<EOF
NODE_ENV=test
DATABASE_URL=postgresql://test:test@localhost:5432/juhi_test
REDIS_URL=redis://localhost:6379/1
KAFKA_BROKERS=localhost:9092
JWT_SECRET=test-secret-key
EOF
- name: 执行数据库迁移
run: |
cd backend
DATABASE_URL=$DATABASE_URL_TEST npx prisma migrate deploy
- name: 运行集成测试
run: cd backend && pnpm test:integration:coverage
env:
DATABASE_URL: postgresql://test:test@localhost:5432/juhi_test
REDIS_URL: redis://localhost:6379/1
KAFKA_BROKERS: localhost:9092
- if: always()
name: 上传集成测试结果
uses: actions/upload-artifact@v3
with:
name: integration-test-results
path: backend/test-results/
- name: 上传覆盖率报告
uses: codecov/codecov-action@v3
with:
files: ./backend/coverage/lcov.info
flags: integration
name: integration-coverage
timeout-minutes: "30"
services:
kafka:
image: confluentinc/cp-kafka:7.5.0
env:
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
KAFKA_BROKER_ID: "1"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: "1"
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
ports:
- 9092:9092
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
zookeeper:
image: confluentinc/cp-zookeeper:7.5.0
env:
ZOOKEEPER_CLIENT_PORT: "2181"
ports:
- 2181:2181
...
|
integration-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862651
|
1771862519
|
1771862651
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
194
|
52
|
6
|
5
|
c8adeb7142f7f1b57a10bfffc3de856524997227
|
0
|
E2E 测试(Playwright) (chromium, approval)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (chromium, approval)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- chromium
flow:
- approval
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862652
|
1771862519
|
1771862652
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
195
|
52
|
6
|
5
|
c8adeb7142f7f1b57a10bfffc3de856524997227
|
0
|
E2E 测试(Playwright) (chromium, lead-to-cash)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (chromium, lead-to-cash)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- chromium
flow:
- lead-to-cash
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862652
|
1771862519
|
1771862652
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
196
|
52
|
6
|
5
|
c8adeb7142f7f1b57a10bfffc3de856524997227
|
0
|
E2E 测试(Playwright) (chromium, renewal)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (chromium, renewal)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- chromium
flow:
- renewal
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862652
|
1771862519
|
1771862652
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
197
|
52
|
6
|
5
|
c8adeb7142f7f1b57a10bfffc3de856524997227
|
0
|
E2E 测试(Playwright) (chromium, service-ticket)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (chromium, service-ticket)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- chromium
flow:
- service-ticket
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862652
|
1771862519
|
1771862652
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
198
|
52
|
6
|
5
|
c8adeb7142f7f1b57a10bfffc3de856524997227
|
0
|
E2E 测试(Playwright) (firefox, approval)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (firefox, approval)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- firefox
flow:
- approval
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862652
|
1771862519
|
1771862652
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
199
|
52
|
6
|
5
|
c8adeb7142f7f1b57a10bfffc3de856524997227
|
0
|
E2E 测试(Playwright) (firefox, lead-to-cash)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (firefox, lead-to-cash)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- firefox
flow:
- lead-to-cash
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862652
|
1771862519
|
1771862652
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
200
|
52
|
6
|
5
|
c8adeb7142f7f1b57a10bfffc3de856524997227
|
0
|
E2E 测试(Playwright) (firefox, renewal)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (firefox, renewal)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- firefox
flow:
- renewal
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862652
|
1771862519
|
1771862652
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
201
|
52
|
6
|
5
|
c8adeb7142f7f1b57a10bfffc3de856524997227
|
0
|
E2E 测试(Playwright) (firefox, service-ticket)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (firefox, service-ticket)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- firefox
flow:
- service-ticket
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862652
|
1771862519
|
1771862652
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
202
|
52
|
6
|
5
|
c8adeb7142f7f1b57a10bfffc3de856524997227
|
0
|
E2E 测试(Playwright) (webkit, approval)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (webkit, approval)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- webkit
flow:
- approval
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862652
|
1771862519
|
1771862652
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
203
|
52
|
6
|
5
|
c8adeb7142f7f1b57a10bfffc3de856524997227
|
0
|
E2E 测试(Playwright) (webkit, lead-to-cash)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (webkit, lead-to-cash)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- webkit
flow:
- lead-to-cash
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862652
|
1771862519
|
1771862652
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
204
|
52
|
6
|
5
|
c8adeb7142f7f1b57a10bfffc3de856524997227
|
0
|
E2E 测试(Playwright) (webkit, renewal)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (webkit, renewal)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- webkit
flow:
- renewal
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862652
|
1771862519
|
1771862652
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
205
|
52
|
6
|
5
|
c8adeb7142f7f1b57a10bfffc3de856524997227
|
0
|
E2E 测试(Playwright) (webkit, service-ticket)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (webkit, service-ticket)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- webkit
flow:
- service-ticket
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862652
|
1771862519
|
1771862652
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
206
|
52
|
6
|
5
|
c8adeb7142f7f1b57a10bfffc3de856524997227
|
0
|
性能测试(K6)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
performance-tests:
name: 性能测试(K6)
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.event_name == 'schedule'
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 K6
run: |
curl https://github.com/grafana/k6/releases/download/v0.47.0/k6-v0.47.0-linux-amd64.tar.gz -L | tar xvz
sudo mv k6-v0.47.0-linux-amd64/k6 /usr/bin/k6
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖并启动服务
run: |
pnpm install --frozen-lockfile
cd backend && pnpm start &
sleep 10
- name: 运行性能测试
run: pnpm test:performance:ci
env:
API_URL: http://localhost:3000
AUTH_TOKEN: ${{ secrets.TEST_AUTH_TOKEN }}
- name: 分析性能结果
run: |
P95=$(jq '.metrics.http_req_duration.values.["p(95)"]' performance-results.json)
echo "P95 响应时间: ${P95}ms"
if (( $(echo "$P95 > 200" | bc -l) )); then
echo "❌ P95 响应时间超过 200ms"
exit 1
fi
echo "✅ 性能测试通过"
- if: always()
name: 上传性能报告
uses: actions/upload-artifact@v3
with:
name: performance-results
path: performance-results.json
timeout-minutes: "30"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
redis:
image: redis:7-alpine
ports:
- 6379:6379
...
|
performance-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862652
|
1771862519
|
1771862652
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
209
|
53
|
6
|
5
|
7145a8553a880d8a94356baf7bcb4e2df4631e61
|
0
|
检测代码变更
|
1
|
name: CI
"on":
push:
branches: name: CI
"on":
push:
branches: [main, develop, 'feature/**', 'claude/**']
pull_request:
branches: [main, develop]
env:
NODE_VERSION: "20"
PNPM_VERSION: "8"
jobs:
detect-changes:
name: 检测代码变更
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: filter
uses: dorny/paths-filter@v3
with:
filters: |
backend:
- 'backend/**'
- 'shared/**'
frontend:
- 'frontend/**'
- 'shared/**'
mobile:
- 'mobile/**'
- 'shared/**'
shared:
- 'shared/**'
workflows:
- '.github/workflows/**'
outputs:
backend: ${{ steps.filter.outputs.backend }}
frontend: ${{ steps.filter.outputs.frontend }}
mobile: ${{ steps.filter.outputs.mobile }}
shared: ${{ steps.filter.outputs.shared }}
workflows: ${{ steps.filter.outputs.workflows }}
...
|
detect-changes
|
null
|
["ubuntu-latest"]
|
40
|
3
|
1771862759
|
1771862764
|
1771862651
|
1771862764
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
210
|
53
|
6
|
5
|
7145a8553a880d8a94356baf7bcb4e2df4631e61
|
0
|
安装依赖
|
0
|
name: CI
"on":
push:
branches: name: CI
"on":
push:
branches: [main, develop, 'feature/**', 'claude/**']
pull_request:
branches: [main, develop]
env:
NODE_VERSION: "20"
PNPM_VERSION: "8"
jobs:
setup:
name: 安装依赖
runs-on: ubuntu-latest
steps:
- name: 检出代码
uses: actions/checkout@v4
- name: 安装 pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 构建共享包
run: pnpm --filter @juhi/shared run build
- name: 缓存 node_modules
uses: actions/cache/save@v4
with:
key: deps-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
path: |
node_modules
backend/node_modules
frontend/node_modules
mobile/node_modules
shared/node_modules
shared/dist
e2e/node_modules
...
|
setup
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862764
|
1771862651
|
1771862764
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
226
|
54
|
6
|
5
|
7145a8553a880d8a94356baf7bcb4e2df4631e61
|
0
|
单元测试 & 覆盖率
|
1
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
unit-tests:
name: 单元测试 & 覆盖率
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 运行单元测试
run: cd backend && pnpm test:unit:coverage
- name: 生成覆盖率报告
run: cd backend && pnpm test:coverage:json
- name: 上传覆盖率到 Codecov
uses: codecov/codecov-action@v3
with:
files: ./backend/coverage/lcov.info
flags: unittests
name: unit-coverage
- name: 检查覆盖率阈值
run: |
cd backend
COVERAGE=$(jq '.total.lines.pct' coverage/coverage.json)
echo "当前覆盖率: $COVERAGE%"
if (( $(echo "$COVERAGE < 85" | bc -l) )); then
echo "❌ 覆盖率低于 85%"
exit 1
fi
echo "✅ 覆盖率达标"
- if: always()
name: 上传测试结果
uses: actions/upload-artifact@v3
with:
name: unit-test-results
path: backend/test-results/
- if: always()
name: 上传覆盖率报告
uses: actions/upload-artifact@v3
with:
name: unit-coverage-report
path: backend/coverage/
timeout-minutes: "15"
...
|
unit-tests
|
null
|
["ubuntu-latest"]
|
41
|
3
|
1771862764
|
1771862765
|
1771862652
|
1771862765
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
227
|
54
|
6
|
5
|
7145a8553a880d8a94356baf7bcb4e2df4631e61
|
0
|
集成测试(API + DB + Events)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
integration-tests:
name: 集成测试(API + DB + Events)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 设置测试环境变量
run: |
cd backend
cat > .env.test <<EOF
NODE_ENV=test
DATABASE_URL=postgresql://test:test@localhost:5432/juhi_test
REDIS_URL=redis://localhost:6379/1
KAFKA_BROKERS=localhost:9092
JWT_SECRET=test-secret-key
EOF
- name: 执行数据库迁移
run: |
cd backend
DATABASE_URL=$DATABASE_URL_TEST npx prisma migrate deploy
- name: 运行集成测试
run: cd backend && pnpm test:integration:coverage
env:
DATABASE_URL: postgresql://test:test@localhost:5432/juhi_test
REDIS_URL: redis://localhost:6379/1
KAFKA_BROKERS: localhost:9092
- if: always()
name: 上传集成测试结果
uses: actions/upload-artifact@v3
with:
name: integration-test-results
path: backend/test-results/
- name: 上传覆盖率报告
uses: codecov/codecov-action@v3
with:
files: ./backend/coverage/lcov.info
flags: integration
name: integration-coverage
timeout-minutes: "30"
services:
kafka:
image: confluentinc/cp-kafka:7.5.0
env:
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
KAFKA_BROKER_ID: "1"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: "1"
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
ports:
- 9092:9092
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
zookeeper:
image: confluentinc/cp-zookeeper:7.5.0
env:
ZOOKEEPER_CLIENT_PORT: "2181"
ports:
- 2181:2181
...
|
integration-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862765
|
1771862652
|
1771862765
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
228
|
54
|
6
|
5
|
7145a8553a880d8a94356baf7bcb4e2df4631e61
|
0
|
E2E 测试(Playwright) (chromium, approval)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (chromium, approval)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- chromium
flow:
- approval
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862765
|
1771862652
|
1771862765
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
229
|
54
|
6
|
5
|
7145a8553a880d8a94356baf7bcb4e2df4631e61
|
0
|
E2E 测试(Playwright) (chromium, lead-to-cash)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (chromium, lead-to-cash)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- chromium
flow:
- lead-to-cash
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862765
|
1771862652
|
1771862765
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
230
|
54
|
6
|
5
|
7145a8553a880d8a94356baf7bcb4e2df4631e61
|
0
|
E2E 测试(Playwright) (chromium, renewal)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (chromium, renewal)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- chromium
flow:
- renewal
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862765
|
1771862652
|
1771862765
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
231
|
54
|
6
|
5
|
7145a8553a880d8a94356baf7bcb4e2df4631e61
|
0
|
E2E 测试(Playwright) (chromium, service-ticket)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (chromium, service-ticket)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- chromium
flow:
- service-ticket
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862765
|
1771862652
|
1771862765
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
232
|
54
|
6
|
5
|
7145a8553a880d8a94356baf7bcb4e2df4631e61
|
0
|
E2E 测试(Playwright) (firefox, approval)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (firefox, approval)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- firefox
flow:
- approval
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862765
|
1771862652
|
1771862765
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
233
|
54
|
6
|
5
|
7145a8553a880d8a94356baf7bcb4e2df4631e61
|
0
|
E2E 测试(Playwright) (firefox, lead-to-cash)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (firefox, lead-to-cash)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- firefox
flow:
- lead-to-cash
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862765
|
1771862652
|
1771862765
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
234
|
54
|
6
|
5
|
7145a8553a880d8a94356baf7bcb4e2df4631e61
|
0
|
E2E 测试(Playwright) (firefox, renewal)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (firefox, renewal)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- firefox
flow:
- renewal
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862765
|
1771862652
|
1771862765
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
235
|
54
|
6
|
5
|
7145a8553a880d8a94356baf7bcb4e2df4631e61
|
0
|
E2E 测试(Playwright) (firefox, service-ticket)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (firefox, service-ticket)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- firefox
flow:
- service-ticket
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862765
|
1771862652
|
1771862765
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
236
|
54
|
6
|
5
|
7145a8553a880d8a94356baf7bcb4e2df4631e61
|
0
|
E2E 测试(Playwright) (webkit, approval)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (webkit, approval)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- webkit
flow:
- approval
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862765
|
1771862652
|
1771862765
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
237
|
54
|
6
|
5
|
7145a8553a880d8a94356baf7bcb4e2df4631e61
|
0
|
E2E 测试(Playwright) (webkit, lead-to-cash)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (webkit, lead-to-cash)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- webkit
flow:
- lead-to-cash
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862765
|
1771862652
|
1771862765
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
238
|
54
|
6
|
5
|
7145a8553a880d8a94356baf7bcb4e2df4631e61
|
0
|
E2E 测试(Playwright) (webkit, renewal)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (webkit, renewal)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- webkit
flow:
- renewal
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862765
|
1771862652
|
1771862765
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
239
|
54
|
6
|
5
|
7145a8553a880d8a94356baf7bcb4e2df4631e61
|
0
|
E2E 测试(Playwright) (webkit, service-ticket)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (webkit, service-ticket)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- webkit
flow:
- service-ticket
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862765
|
1771862652
|
1771862765
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
240
|
54
|
6
|
5
|
7145a8553a880d8a94356baf7bcb4e2df4631e61
|
0
|
性能测试(K6)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
performance-tests:
name: 性能测试(K6)
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.event_name == 'schedule'
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 K6
run: |
curl https://github.com/grafana/k6/releases/download/v0.47.0/k6-v0.47.0-linux-amd64.tar.gz -L | tar xvz
sudo mv k6-v0.47.0-linux-amd64/k6 /usr/bin/k6
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖并启动服务
run: |
pnpm install --frozen-lockfile
cd backend && pnpm start &
sleep 10
- name: 运行性能测试
run: pnpm test:performance:ci
env:
API_URL: http://localhost:3000
AUTH_TOKEN: ${{ secrets.TEST_AUTH_TOKEN }}
- name: 分析性能结果
run: |
P95=$(jq '.metrics.http_req_duration.values.["p(95)"]' performance-results.json)
echo "P95 响应时间: ${P95}ms"
if (( $(echo "$P95 > 200" | bc -l) )); then
echo "❌ P95 响应时间超过 200ms"
exit 1
fi
echo "✅ 性能测试通过"
- if: always()
name: 上传性能报告
uses: actions/upload-artifact@v3
with:
name: performance-results
path: performance-results.json
timeout-minutes: "30"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
redis:
image: redis:7-alpine
ports:
- 6379:6379
...
|
performance-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862765
|
1771862652
|
1771862765
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
243
|
55
|
6
|
5
|
7145a8553a880d8a94356baf7bcb4e2df4631e61
|
0
|
生产环境健康检查
|
1
|
name: Health Check
"on":
schedule:
name: Health Check
"on":
schedule:
# 每 5 分钟检查一次
- cron: '*/5 * * * *'
workflow_dispatch:
jobs:
health-check:
name: 生产环境健康检查
runs-on: ubuntu-latest
if: github.repository == 'your-org/juhi' # 替换为实际仓库
steps:
- id: api-health
name: API 健康检查
run: |
RESPONSE=$(curl -sf https://juhi.example.com/v1/health || echo '{"status":"error"}')
echo "response=$RESPONSE" >> $GITHUB_OUTPUT
STATUS=$(echo $RESPONSE | jq -r '.status // "error"')
if [ "$STATUS" != "ok" ]; then
echo "API 健康检查失败"
exit 1
fi
echo "API 健康检查通过"
- name: 前端可访问性检查
run: |
HTTP_STATUS=$(curl -so /dev/null -w "%{http_code}" https://juhi.example.com/)
if [ "$HTTP_STATUS" != "200" ]; then
echo "前端返回 HTTP $HTTP_STATUS"
exit 1
fi
echo "前端可访问性检查通过"
- name: SSL 证书检查
run: |
EXPIRY_DATE=$(echo | openssl s_client -servername juhi.example.com -connect juhi.example.com:443 2>/dev/null | openssl x509 -noout -enddate | cut -d= -f2)
EXPIRY_EPOCH=$(date -d "$EXPIRY_DATE" +%s)
NOW_EPOCH=$(date +%s)
DAYS_LEFT=$(( ($EXPIRY_EPOCH - $NOW_EPOCH) / 86400 ))
echo "SSL 证书剩余 $DAYS_LEFT 天"
if [ $DAYS_LEFT -lt 7 ]; then
echo "::warning::SSL 证书将在 $DAYS_LEFT 天后过期!"
fi
if [ $DAYS_LEFT -lt 0 ]; then
echo "SSL 证书已过期"
exit 1
fi
- name: 响应时间检查
run: |
RESPONSE_TIME=$(curl -so /dev/null -w "%{time_total}" https://juhi.example.com/v1/health)
echo "API 响应时间: ${RESPONSE_TIME}s"
# 响应时间超过 5 秒告警
if (( $(echo "$RESPONSE_TIME > 5.0" | bc -l) )); then
echo "::warning::API 响应时间过长: ${RESPONSE_TIME}s"
fi
- if: failure()
name: Slack 通知(失败时)
uses: 8398a7/action-slack@v3
with:
fields: repo,message,commit,author,action,eventName,workflow
status: ${{ job.status }}
text: "\U0001F6A8 生产环境健康检查失败!请立即检查。"
webhook_url: ${{ secrets.SLACK_WEBHOOK }}
...
|
health-check
|
null
|
["ubuntu-latest"]
|
42
|
4
|
1771862766
|
1771862766
|
1771862710
|
1771862767
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
244
|
56
|
6
|
5
|
343b38f6bfbbd7d44a1387e1351700df68013555
|
0
|
检测代码变更
|
1
|
name: CI
"on":
push:
branches: name: CI
"on":
push:
branches: [main, develop, 'feature/**', 'claude/**']
pull_request:
branches: [main, develop]
env:
NODE_VERSION: "20"
PNPM_VERSION: "8"
jobs:
detect-changes:
name: 检测代码变更
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: filter
uses: dorny/paths-filter@v3
with:
filters: |
backend:
- 'backend/**'
- 'shared/**'
frontend:
- 'frontend/**'
- 'shared/**'
mobile:
- 'mobile/**'
- 'shared/**'
shared:
- 'shared/**'
workflows:
- '.github/workflows/**'
outputs:
backend: ${{ steps.filter.outputs.backend }}
frontend: ${{ steps.filter.outputs.frontend }}
mobile: ${{ steps.filter.outputs.mobile }}
shared: ${{ steps.filter.outputs.shared }}
workflows: ${{ steps.filter.outputs.workflows }}
...
|
detect-changes
|
null
|
["ubuntu-latest"]
|
43
|
3
|
1771862768
|
1771862813
|
1771862764
|
1771862813
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
245
|
56
|
6
|
5
|
343b38f6bfbbd7d44a1387e1351700df68013555
|
0
|
安装依赖
|
0
|
name: CI
"on":
push:
branches: name: CI
"on":
push:
branches: [main, develop, 'feature/**', 'claude/**']
pull_request:
branches: [main, develop]
env:
NODE_VERSION: "20"
PNPM_VERSION: "8"
jobs:
setup:
name: 安装依赖
runs-on: ubuntu-latest
steps:
- name: 检出代码
uses: actions/checkout@v4
- name: 安装 pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 构建共享包
run: pnpm --filter @juhi/shared run build
- name: 缓存 node_modules
uses: actions/cache/save@v4
with:
key: deps-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
path: |
node_modules
backend/node_modules
frontend/node_modules
mobile/node_modules
shared/node_modules
shared/dist
e2e/node_modules
...
|
setup
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862813
|
1771862764
|
1771862813
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
261
|
57
|
6
|
5
|
343b38f6bfbbd7d44a1387e1351700df68013555
|
0
|
单元测试 & 覆盖率
|
1
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
unit-tests:
name: 单元测试 & 覆盖率
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 运行单元测试
run: cd backend && pnpm test:unit:coverage
- name: 生成覆盖率报告
run: cd backend && pnpm test:coverage:json
- name: 上传覆盖率到 Codecov
uses: codecov/codecov-action@v3
with:
files: ./backend/coverage/lcov.info
flags: unittests
name: unit-coverage
- name: 检查覆盖率阈值
run: |
cd backend
COVERAGE=$(jq '.total.lines.pct' coverage/coverage.json)
echo "当前覆盖率: $COVERAGE%"
if (( $(echo "$COVERAGE < 85" | bc -l) )); then
echo "❌ 覆盖率低于 85%"
exit 1
fi
echo "✅ 覆盖率达标"
- if: always()
name: 上传测试结果
uses: actions/upload-artifact@v3
with:
name: unit-test-results
path: backend/test-results/
- if: always()
name: 上传覆盖率报告
uses: actions/upload-artifact@v3
with:
name: unit-coverage-report
path: backend/coverage/
timeout-minutes: "15"
...
|
unit-tests
|
null
|
["ubuntu-latest"]
|
44
|
3
|
1771862813
|
1771862814
|
1771862765
|
1771862814
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
262
|
57
|
6
|
5
|
343b38f6bfbbd7d44a1387e1351700df68013555
|
0
|
集成测试(API + DB + Events)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
integration-tests:
name: 集成测试(API + DB + Events)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 设置测试环境变量
run: |
cd backend
cat > .env.test <<EOF
NODE_ENV=test
DATABASE_URL=postgresql://test:test@localhost:5432/juhi_test
REDIS_URL=redis://localhost:6379/1
KAFKA_BROKERS=localhost:9092
JWT_SECRET=test-secret-key
EOF
- name: 执行数据库迁移
run: |
cd backend
DATABASE_URL=$DATABASE_URL_TEST npx prisma migrate deploy
- name: 运行集成测试
run: cd backend && pnpm test:integration:coverage
env:
DATABASE_URL: postgresql://test:test@localhost:5432/juhi_test
REDIS_URL: redis://localhost:6379/1
KAFKA_BROKERS: localhost:9092
- if: always()
name: 上传集成测试结果
uses: actions/upload-artifact@v3
with:
name: integration-test-results
path: backend/test-results/
- name: 上传覆盖率报告
uses: codecov/codecov-action@v3
with:
files: ./backend/coverage/lcov.info
flags: integration
name: integration-coverage
timeout-minutes: "30"
services:
kafka:
image: confluentinc/cp-kafka:7.5.0
env:
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
KAFKA_BROKER_ID: "1"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: "1"
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
ports:
- 9092:9092
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
zookeeper:
image: confluentinc/cp-zookeeper:7.5.0
env:
ZOOKEEPER_CLIENT_PORT: "2181"
ports:
- 2181:2181
...
|
integration-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862814
|
1771862765
|
1771862814
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
263
|
57
|
6
|
5
|
343b38f6bfbbd7d44a1387e1351700df68013555
|
0
|
E2E 测试(Playwright) (chromium, approval)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (chromium, approval)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- chromium
flow:
- approval
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862814
|
1771862765
|
1771862814
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
264
|
57
|
6
|
5
|
343b38f6bfbbd7d44a1387e1351700df68013555
|
0
|
E2E 测试(Playwright) (chromium, lead-to-cash)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (chromium, lead-to-cash)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- chromium
flow:
- lead-to-cash
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862814
|
1771862765
|
1771862814
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
265
|
57
|
6
|
5
|
343b38f6bfbbd7d44a1387e1351700df68013555
|
0
|
E2E 测试(Playwright) (chromium, renewal)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (chromium, renewal)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- chromium
flow:
- renewal
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862814
|
1771862765
|
1771862814
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
266
|
57
|
6
|
5
|
343b38f6bfbbd7d44a1387e1351700df68013555
|
0
|
E2E 测试(Playwright) (chromium, service-ticket)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (chromium, service-ticket)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- chromium
flow:
- service-ticket
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862814
|
1771862765
|
1771862814
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
267
|
57
|
6
|
5
|
343b38f6bfbbd7d44a1387e1351700df68013555
|
0
|
E2E 测试(Playwright) (firefox, approval)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (firefox, approval)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- firefox
flow:
- approval
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862814
|
1771862765
|
1771862814
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
268
|
57
|
6
|
5
|
343b38f6bfbbd7d44a1387e1351700df68013555
|
0
|
E2E 测试(Playwright) (firefox, lead-to-cash)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (firefox, lead-to-cash)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- firefox
flow:
- lead-to-cash
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862814
|
1771862765
|
1771862814
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
269
|
57
|
6
|
5
|
343b38f6bfbbd7d44a1387e1351700df68013555
|
0
|
E2E 测试(Playwright) (firefox, renewal)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (firefox, renewal)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- firefox
flow:
- renewal
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862814
|
1771862765
|
1771862814
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
270
|
57
|
6
|
5
|
343b38f6bfbbd7d44a1387e1351700df68013555
|
0
|
E2E 测试(Playwright) (firefox, service-ticket)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (firefox, service-ticket)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- firefox
flow:
- service-ticket
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862814
|
1771862765
|
1771862814
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
271
|
57
|
6
|
5
|
343b38f6bfbbd7d44a1387e1351700df68013555
|
0
|
E2E 测试(Playwright) (webkit, approval)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (webkit, approval)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- webkit
flow:
- approval
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862814
|
1771862765
|
1771862814
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
272
|
57
|
6
|
5
|
343b38f6bfbbd7d44a1387e1351700df68013555
|
0
|
E2E 测试(Playwright) (webkit, lead-to-cash)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (webkit, lead-to-cash)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- webkit
flow:
- lead-to-cash
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862814
|
1771862765
|
1771862814
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
273
|
57
|
6
|
5
|
343b38f6bfbbd7d44a1387e1351700df68013555
|
0
|
E2E 测试(Playwright) (webkit, renewal)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (webkit, renewal)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- webkit
flow:
- renewal
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862814
|
1771862765
|
1771862814
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
274
|
57
|
6
|
5
|
343b38f6bfbbd7d44a1387e1351700df68013555
|
0
|
E2E 测试(Playwright) (webkit, service-ticket)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
e2e-tests:
name: E2E 测试(Playwright) (webkit, service-ticket)
runs-on: ubuntu-latest
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖
run: pnpm install --frozen-lockfile
- name: 安装 Playwright 浏览器
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
- name: 构建前端
run: cd frontend && pnpm build
- name: 启动服务
run: |
cd backend && pnpm start &
cd frontend && pnpm preview &
sleep 10
- name: 运行 E2E 测试
run: pnpm test:e2e --project=${{ matrix.browser }} --grep="${{ matrix.flow }}"
- if: always()
name: 上传 Playwright 报告
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-report
path: e2e/playwright-report/
- if: failure()
name: 上传失败截图
uses: actions/upload-artifact@v3
with:
name: e2e-${{ matrix.browser }}-${{ matrix.flow }}-screenshots
path: e2e/screenshots/
timeout-minutes: "45"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s
strategy:
matrix:
browser:
- webkit
flow:
- service-ticket
...
|
e2e-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862814
|
1771862765
|
1771862814
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
275
|
57
|
6
|
5
|
343b38f6bfbbd7d44a1387e1351700df68013555
|
0
|
性能测试(K6)
|
0
|
name: 深度完整全面自动化测试
"on":
push:
name: 深度完整全面自动化测试
"on":
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
# 每天凌晨 2 点运行完整测试
- cron: '0 2 * * *'
env:
NODE_VERSION: "18"
PNPM_VERSION: "8"
jobs:
performance-tests:
name: 性能测试(K6)
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.event_name == 'schedule'
steps:
- name: Checkout 代码
uses: actions/checkout@v3
- name: 安装 K6
run: |
curl https://github.com/grafana/k6/releases/download/v0.47.0/k6-v0.47.0-linux-amd64.tar.gz -L | tar xvz
sudo mv k6-v0.47.0-linux-amd64/k6 /usr/bin/k6
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
- name: 安装依赖并启动服务
run: |
pnpm install --frozen-lockfile
cd backend && pnpm start &
sleep 10
- name: 运行性能测试
run: pnpm test:performance:ci
env:
API_URL: http://localhost:3000
AUTH_TOKEN: ${{ secrets.TEST_AUTH_TOKEN }}
- name: 分析性能结果
run: |
P95=$(jq '.metrics.http_req_duration.values.["p(95)"]' performance-results.json)
echo "P95 响应时间: ${P95}ms"
if (( $(echo "$P95 > 200" | bc -l) )); then
echo "❌ P95 响应时间超过 200ms"
exit 1
fi
echo "✅ 性能测试通过"
- if: always()
name: 上传性能报告
uses: actions/upload-artifact@v3
with:
name: performance-results
path: performance-results.json
timeout-minutes: "30"
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: juhi_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
ports:
- 5432:5432
redis:
image: redis:7-alpine
ports:
- 6379:6379
...
|
performance-tests
|
null
|
["ubuntu-latest"]
|
0
|
3
|
0
|
1771862814
|
1771862765
|
1771862814
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|
|
278
|
58
|
6
|
5
|
18a5bb9c67c571fc2cad6ffe61e70633bcec36a8
|
0
|
检测代码变更
|
1
|
name: CI
"on":
push:
branches: name: CI
"on":
push:
branches: [main, develop, 'feature/**', 'claude/**']
pull_request:
branches: [main, develop]
env:
NODE_VERSION: "20"
PNPM_VERSION: "8"
jobs:
detect-changes:
name: 检测代码变更
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: filter
uses: dorny/paths-filter@v3
with:
filters: |
backend:
- 'backend/**'
- 'shared/**'
frontend:
- 'frontend/**'
- 'shared/**'
mobile:
- 'mobile/**'
- 'shared/**'
shared:
- 'shared/**'
workflows:
- '.github/workflows/**'
outputs:
backend: ${{ steps.filter.outputs.backend }}
frontend: ${{ steps.filter.outputs.frontend }}
mobile: ${{ steps.filter.outputs.mobile }}
shared: ${{ steps.filter.outputs.shared }}
workflows: ${{ steps.filter.outputs.workflows }}
...
|
detect-changes
|
null
|
["ubuntu-latest"]
|
45
|
2
|
1771862815
|
1771862849
|
1771862813
|
1771862849
|
NULL
|
NULL
|
|
0
|
Edit
Delete
|