Skip to content

Make officers module more DRY #46

Make officers module more DRY

Make officers module more DRY #46

Workflow file for this run

name: Alembic Upgrade Head
on: pull_request
jobs:
alembic_upgrade_head:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U runner"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
POSTGRES_USER: runner
POSTGRES_DB: main
POSTGRES_HOST_AUTH_METHOD: trust
steps:
- uses: actions/checkout@v4
- name: Wait for PostgreSQL to be ready
run: |
until pg_isready -h localhost -p 5432 -U runner; do
echo "Waiting for PostgreSQL..."
sleep 1
done
- name: Install dependencies
run: |
sudo apt-get install python3.11 python3.11-venv
python3.11 -m pip install --upgrade pip
python3.11 -m venv venv
source ./venv/bin/activate
pip install -r requirements.txt
# This will fail if there are divergent heads and alembic gets confused;
# e.g., un-sanitarily merging main into a dev branch.
- name: Run alembic upgrade head
run: |
source ./venv/bin/activate
cd src
alembic upgrade head