test: 拆分慢速迁移测试并优化 pre-push

- 迁移测试标记 migration,单独运行约 130 秒
- 非迁移测试约 90 秒,日常开发跑快速集
- pre-push 默认跳过 migration;改迁移/模型/迁移测试时自动全量
- FULL_TESTS=1 可强制全量,不删除任何迁移测试
This commit is contained in:
yml
2026-11-24 19:14:40 +08:00
parent b10018efdd
commit b0be3d15cc
6 changed files with 29 additions and 4 deletions
+2
View File
@@ -10,6 +10,7 @@ import secrets
from pathlib import Path
from urllib.parse import quote_plus
import pytest
from alembic import command
from alembic.config import Config
from sqlalchemy import create_engine, text
@@ -45,6 +46,7 @@ def _insert_task(conn, *, status: str, cookie: str, message: str = "") -> None:
)
@pytest.mark.migration
class TestLoginAttemptMigration:
def setup_method(self):
creds = get_mysql_credentials()