fix: CI动态端口+超时控制,避免e2e卡死
All checks were successful
PR Preview / teardown-preview (pull_request) Successful in 15s
PR Preview / test (pull_request) Has been skipped
PR Preview / deploy-preview (pull_request) Has been skipped
Deploy Production / test (push) Successful in 8s
Test / unit-test (push) Successful in 6s
Deploy Production / deploy (push) Successful in 8s
Test / build-check (push) Successful in 4s
Test / e2e-test (push) Successful in 51s

- 后端端口随机9000-9999,前端4000-4999
- 数据库文件按端口号隔离
- vite proxy支持VITE_API_PORT环境变量
- 服务启动超时30秒,失败即退出
- Cypress: defaultCommandTimeout=5s, pageLoadTimeout=10s
- 整个e2e job timeout 5分钟

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit was merged in pull request #24.
This commit is contained in:
2026-04-11 11:11:02 +00:00
parent 83078f8f8b
commit c53dda0622
2 changed files with 32 additions and 15 deletions

View File

@@ -10,8 +10,8 @@ export default defineConfig({
plugins: [vue()],
server: {
proxy: {
'/api': 'http://localhost:8000',
'/uploads': 'http://localhost:8000'
'/api': `http://localhost:${process.env.VITE_API_PORT || 8000}`,
'/uploads': `http://localhost:${process.env.VITE_API_PORT || 8000}`
}
},
build: {