Bump jinja2 from 3.1.5 to 3.1.6 #1893
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will test that the alembic migrations apply forwards and backwards. | |
name: Test Alembic Migrations | |
on: | |
push: | |
pull_request: | |
types: [opened] | |
jobs: | |
migrations: | |
name: ⚗ Test Alembic Migrations | |
runs-on: ubuntu-latest | |
env: | |
SQLALCHEMY_DATABASE_URI: postgresql://postgres:secret@localhost:5432 | |
POSTGRESQL_PASSWORD: secret | |
SENDGRID_API_KEY: unused | |
SHOPIFY_HMAC_SECRET: unused | |
SECRET_KEY: unused | |
steps: | |
- uses: actions/checkout@v4 | |
- name: ➕ Install poetry | |
uses: snok/install-poetry@v1 | |
- name: 🐍 Set up Python | |
id: python | |
uses: actions/setup-python@v4.7.0 | |
with: | |
python-version-file: "pyproject.toml" | |
cache: 'poetry' | |
- name: 🗄 Set up PostgreSQL | |
uses: danielweller-swp/postgresql-action@v2 | |
with: | |
postgresql version: '16' # See https://hub.docker.com/_/postgres for available versions | |
postgresql user: postgres | |
postgresql password: secret | |
- name: 🔧 Install dependencies | |
run: poetry install --no-interaction --no-root | |
- name: 🔎 Check connection to PostgreSQL | |
run: | | |
source $(poetry env info --path)/bin/activate | |
python -m app.db.check_can_connect_to_db | |
- name: ⚡ Run forward migrations | |
run: | | |
poetry run alembic upgrade head | |
- name: ⚡ Run backwards migrations | |
run: | | |
poetry run alembic downgrade -10 | |
- name: ⚡ Retest forward migrations | |
run: | | |
poetry run alembic upgrade head |