Remove config files and create alembic workflow #10
Workflow file for this run
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
| 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 postgres" | |
| --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 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 |