Skip to content

Commit 13e1530

Browse files
committed
Remove config files and create alembic workflow
1 parent efe6e59 commit 13e1530

File tree

9 files changed

+46
-243
lines changed

9 files changed

+46
-243
lines changed

.github/workflows/alembic.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Alembic Upgrade Head
2+
on: pull_request
3+
4+
jobs:
5+
alembic_upgrade_head:
6+
runs-on: ubuntu-latest
7+
8+
services:
9+
postgres:
10+
image: postgres:latest
11+
ports:
12+
- 5432:5432
13+
options: >-
14+
--health-cmd "pg_isready -U postgres"
15+
--health-interval 10s
16+
--health-timeout 5s
17+
--health-retries 5
18+
env:
19+
POSTGRES_USER: csss-site
20+
POSTGRES_DB: main
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Wait for PostgreSQL to be ready
26+
run: |
27+
until pg_isready -h localhost -p 5432 -U csss-site; do
28+
echo "Waiting for PostgreSQL..."
29+
sleep 1
30+
done
31+
32+
- name: Install dependencies
33+
run: |
34+
sudo apt-get install python3.11 python3.11-venv postgresql postgresql-contrib
35+
python3.11 -m pip install --upgrade pip
36+
python3.11 -m venv venv
37+
source ./venv/bin/activate
38+
pip install -r requirements.txt
39+
40+
- name: Run alembic upgrade head
41+
run: |
42+
source ./venv/bin/activate
43+
cd src
44+
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)