2026-07-10 10:45:27 +08:00
|
|
|
|
.PHONY: build build-backend build-frontend test test-backend test-frontend test-frontend-critical
|
2026-04-22 14:57:47 +08:00
|
|
|
|
|
|
|
|
|
|
FRONTEND_CRITICAL_VITEST := \
|
2026-09-06 04:09:04 +08:00
|
|
|
|
src/i18n/__tests__/localeKeyCompleteness.spec.ts \
|
2026-08-02 08:13:15 -07:00
|
|
|
|
src/api/__tests__/client.spec.ts \
|
|
|
|
|
|
src/api/__tests__/tokenRefresh.spec.ts \
|
2026-08-07 11:01:22 +08:00
|
|
|
|
src/api/__tests__/channelMonitorV2.spec.ts \
|
2026-04-22 14:57:47 +08:00
|
|
|
|
src/views/auth/__tests__/LinuxDoCallbackView.spec.ts \
|
|
|
|
|
|
src/views/auth/__tests__/WechatCallbackView.spec.ts \
|
|
|
|
|
|
src/views/user/__tests__/PaymentView.spec.ts \
|
|
|
|
|
|
src/views/user/__tests__/PaymentResultView.spec.ts \
|
2026-08-07 11:01:22 +08:00
|
|
|
|
src/views/user/__tests__/ChannelStatusView.mode.spec.ts \
|
2026-04-22 14:57:47 +08:00
|
|
|
|
src/components/user/profile/__tests__/ProfileInfoCard.spec.ts \
|
2026-08-07 11:01:22 +08:00
|
|
|
|
src/views/admin/__tests__/SettingsView.spec.ts \
|
|
|
|
|
|
src/features/channel-monitor-v2/__tests__/designSystem.structure.spec.ts \
|
|
|
|
|
|
src/features/channel-monitor-v2/__tests__/monitorFormat.spec.ts \
|
|
|
|
|
|
src/features/channel-monitor-v2/__tests__/monitorZoom.spec.ts
|
2025-12-29 10:03:27 +08:00
|
|
|
|
|
|
|
|
|
|
# 一键编译前后端
|
|
|
|
|
|
build: build-backend build-frontend
|
|
|
|
|
|
|
|
|
|
|
|
# 编译后端(复用 backend/Makefile)
|
|
|
|
|
|
build-backend:
|
|
|
|
|
|
@$(MAKE) -C backend build
|
|
|
|
|
|
|
|
|
|
|
|
# 编译前端(需要已安装依赖)
|
|
|
|
|
|
build-frontend:
|
2026-01-07 16:35:51 +08:00
|
|
|
|
@pnpm --dir frontend run build
|
2026-01-05 13:54:43 +08:00
|
|
|
|
|
|
|
|
|
|
# 运行测试(后端 + 前端)
|
|
|
|
|
|
test: test-backend test-frontend
|
|
|
|
|
|
|
|
|
|
|
|
test-backend:
|
|
|
|
|
|
@$(MAKE) -C backend test
|
|
|
|
|
|
|
|
|
|
|
|
test-frontend:
|
2026-01-07 16:35:51 +08:00
|
|
|
|
@pnpm --dir frontend run lint:check
|
|
|
|
|
|
@pnpm --dir frontend run typecheck
|
2026-04-22 14:57:47 +08:00
|
|
|
|
@$(MAKE) test-frontend-critical
|
|
|
|
|
|
|
|
|
|
|
|
test-frontend-critical:
|
|
|
|
|
|
@pnpm --dir frontend exec vitest run $(FRONTEND_CRITICAL_VITEST)
|