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
@@ -5,6 +5,7 @@ import secrets
from datetime import UTC, datetime
from urllib.parse import quote_plus
import pytest
from alembic import command
from alembic.config import Config
from sqlalchemy import create_engine, inspect, text
@@ -15,6 +16,7 @@ from tests.support.db import get_mysql_credentials
TARGET_REVISION = "20261106_0065"
@pytest.mark.migration
def test_0065_upgrade_downgrade_roundtrip():
creds = get_mysql_credentials()
mig_db = f"douyu_login_mig_rt_{secrets.token_hex(4)}"