Remove config files and create alembic workflow #4
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 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - 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: Setup postgres db | |
| run: | | |
| sudo -u postgres createdb --no-password main | |
| sudo -u postgres createuser --no-password csss-site | |
| sudo -u postgres psql --command='GRANT ALL PRIVILEGES ON DATABASE main TO "csss-site"' | |
| sudo -u postgres psql main --command='GRANT ALL ON SCHEMA public TO "csss-site"' | |
| - name: Run alembic upgrade head | |
| run: | | |
| source ./venv/bin/activate | |
| cd src | |
| alembic upgrade head |