fix: CI动态端口+超时控制,避免e2e卡死
All checks were successful
Test / unit-test (push) Successful in 6s
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 is contained in:
2026-04-11 11:08:19 +00:00
parent 83078f8f8b
commit d458bd05cd
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: {