Skip to content

Commit 94538df

Browse files
committed
Remove config files and create alembic workflow
1 parent efe6e59 commit 94538df

File tree

9 files changed

+35
-243
lines changed

9 files changed

+35
-243
lines changed

.github/workflows/alembic.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Alembic Upgrade Head
2+
on: pull_request
3+
4+
jobs:
5+
alembic_upgrade_head:
6+
runs-on: ubuntu-latest
7+
8+
steps:
9+
- uses: actions/checkout@v4
10+
11+
- name: Install dependencies
12+
run: |
13+
echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list
14+
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
15+
apt update && apt upgrade -y
16+
sudo apt-get install python3.11 python3.11-venv postgresql-15 postgresql-contrib
17+
python3.11 -m pip install --upgrade pip
18+
python3.11 -m venv venv
19+
source ./venv/bin/activate
20+
pip install -r requirements.txt
21+
22+
- name: Setup postgres db
23+
run: |
24+
sudo -u postgres createdb --no-password main
25+
sudo -u postgres createuser --no-password csss-site
26+
sudo -u postgres psql --command='GRANT ALL PRIVILEGES ON DATABASE main TO "csss-site"'
27+
sudo -u postgres psql main --command='GRANT ALL ON SCHEMA public TO "csss-site"'
28+
29+
- name: Run alembic upgrade head
30+
run: |
31+
source ./venv/bin/activate
32+
cd src
33+
alembic upgrade head

.github/workflows/pytest_unit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Unit Tests
22
on: pull_request
33

44
jobs:
5-
test:
5+
unit_tests:
66
runs-on: ubuntu-latest
77
timeout-minutes: 5
88

@@ -31,4 +31,4 @@ jobs:
3131
- name: Run unit tests
3232
run: |
3333
source ./venv/bin/activate
34-
pytest ./tests/unit -v
34+
pytest ./tests/unit -v

config/csss-site.service

Lines changed: 0 additions & 14 deletions
This file was deleted.

config/nginx.conf

Lines changed: 0 additions & 30 deletions
This file was deleted.

config/sudoers.conf

Lines changed: 0 additions & 2 deletions
This file was deleted.

config/update_config.sh

Lines changed: 0 additions & 28 deletions
This file was deleted.

deploy.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

fresh_setup.sh

Lines changed: 0 additions & 135 deletions
This file was deleted.

gunicorn_start.sh

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)