Skip to content

Fix notebook plotly remount crash #1158

Fix notebook plotly remount crash

Fix notebook plotly remount crash #1158

Workflow file for this run

name: DB Migrations
on:
push:
branches:
- develop
pull_request:
workflow_dispatch:
jobs:
alembic-migrations:
strategy:
matrix:
python-version: ["3.10"]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Install dependencies
run: uv sync --locked --extra cpu --no-install-package llama-cpp-python
- name: Set DB env vars
run: |
echo "DB_FILE=$RUNNER_TEMP/dashai-ci.sqlite3" >> "$GITHUB_ENV"
echo "DATABASE_URL=sqlite:///$RUNNER_TEMP/dashai-ci.sqlite3" >> "$GITHUB_ENV"
echo "Temp dir: $RUNNER_TEMP"
- name: Show Alembic info
run: |
uv run --no-sync alembic --version
echo "DB will be at: $DATABASE_URL"
- name: Prepare temp dir
run: |
mkdir -p "$(dirname "$DB_FILE")"
rm -f "$DB_FILE"
# upgrade to head
- name: Upgrade to head
run: |
uv run --no-sync alembic -x url="$DATABASE_URL" upgrade head
# Checks downgrade and upgrade again (reversibility)
- name: Downgrade to base and upgrade again (reversibility check)
run: |
uv run --no-sync alembic -x url="$DATABASE_URL" downgrade base
uv run --no-sync alembic -x url="$DATABASE_URL" upgrade head
- name: Check for pending autogenerate (python-based)
env:
PYTHONPATH: "${PYTHONPATH}:."
run: uv run --no-sync python -m scripts.ci_alembic_check