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-09-06 11:25:33 +08:00
|
|
|
|
src/api/__tests__/keys.bulkUpdate.spec.ts \
|
2026-10-13 14:42:29 +08:00
|
|
|
|
src/composables/__tests__/useModelWhitelist.spec.ts \
|
2026-09-20 15:47:53 +08:00
|
|
|
|
src/components/account/__tests__/OpenAIReferralCell.spec.ts \
|
|
|
|
|
|
src/components/account/__tests__/OpenAIReferralCell.transport.spec.ts \
|
|
|
|
|
|
src/components/account/__tests__/OpenAIQuotaResetCell.spark_shadow.spec.ts \
|
2026-09-27 11:08:41 +08:00
|
|
|
|
src/constants/__tests__/platforms.spec.ts \
|
|
|
|
|
|
src/components/account/__tests__/credentialsBuilder.platformCatalog.spec.ts \
|
|
|
|
|
|
src/components/account/__tests__/CreateAccountModal.spec.ts \
|
|
|
|
|
|
src/components/account/__tests__/EditAccountModal.spec.ts \
|
2026-10-03 12:51:00 +08:00
|
|
|
|
src/components/account/__tests__/credentialsBuilder.spec.ts \
|
|
|
|
|
|
src/components/account/__tests__/OpenCodeGoProtocolRulesEditor.spec.ts \
|
2026-09-06 11:25:33 +08:00
|
|
|
|
src/components/keys/__tests__/BulkEditKeysModal.spec.ts \
|
2026-09-21 08:16:18 +08:00
|
|
|
|
src/components/admin/user/__tests__/UserPlatformQuotaModal.spec.ts \
|
2026-09-06 11:25:33 +08:00
|
|
|
|
src/views/user/__tests__/KeysView.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-10-03 17:09:38 +08:00
|
|
|
|
src/components/user/profile/__tests__/ProfileIdentityBindingsSection.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 \
|
2026-10-01 23:59:58 +08:00
|
|
|
|
src/features/channel-monitor-v2/__tests__/monitorZoom.spec.ts \
|
|
|
|
|
|
src/components/admin/channel/__tests__/PricingEntryCard.modelDefaultPrice.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)
|