Skip to content

Remove config files and create alembic workflow #7

Remove config files and create alembic workflow

Remove config files and create alembic workflow #7

Workflow file for this run

name: Alembic Upgrade Head
on: pull_request
jobs:
alembic_upgrade_head:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
POSTGRES_USER: csss-site
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 csss-site; do
echo "Waiting for PostgreSQL..."
sleep 1
done
- name: Install dependencies
run: |
sudo apt-get install python3.11 python3.11-venv postgresql postgresql-contrib
python3.11 -m pip install --upgrade pip
python3.11 -m venv venv
source ./venv/bin/activate
pip install -r requirements.txt
- name: Run alembic upgrade head
run: |
source ./venv/bin/activate
cd src
alembic upgrade head