ci: validate alembic migration chain
Deploy / Deploy Production (push) Failing after 2095h41m1s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 2095h41m25s
Deploy / Deploy Staging (push) Has been cancelled

This commit is contained in:
Xiaoxia AI
2026-06-21 07:49:23 +08:00
parent 309906cb53
commit 4a8703b037
3 changed files with 23 additions and 9 deletions
+10 -3
View File
@@ -61,12 +61,19 @@ jobs:
- name: Run code quality checks
run: |
python -m compileall -q apps packages tests
python -m black --check apps packages tests
python -m isort --check-only apps packages tests
python -m compileall -q alembic apps packages tests
python -m black --check alembic apps packages tests
python -m isort --check-only alembic apps packages tests
python -m flake8 apps packages tests --count --statistics
bandit -r apps packages -q
- name: Validate Alembic migrations
run: |
DATABASE_URL=postgresql+psycopg://postgres:postgres@localhost:5432/xiaoxia_saas \
python -m alembic upgrade head --sql > /tmp/alembic-upgrade.sql
test -s /tmp/alembic-upgrade.sql
grep -q "Running upgrade" /tmp/alembic-upgrade.sql
- name: Run tests
run: |
python -m pytest tests -q