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>
25 lines
621 B
JavaScript
25 lines
621 B
JavaScript
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
|
|
const buildTime = new Date().toLocaleString('en-GB', { timeZone: 'Europe/London', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit' })
|
|
|
|
export default defineConfig({
|
|
define: {
|
|
__BUILD_TIME__: JSON.stringify(buildTime),
|
|
},
|
|
plugins: [vue()],
|
|
server: {
|
|
proxy: {
|
|
'/api': `http://localhost:${process.env.VITE_API_PORT || 8000}`,
|
|
'/uploads': `http://localhost:${process.env.VITE_API_PORT || 8000}`
|
|
}
|
|
},
|
|
build: {
|
|
outDir: 'dist'
|
|
},
|
|
test: {
|
|
environment: 'jsdom',
|
|
globals: true,
|
|
}
|
|
})
|