Skip to content

Commit b8ce930

Browse files
committed
Merge branch 'main' into dev-84
2 parents df198f2 + 2379c2b commit b8ce930

File tree

11 files changed

+55
-236
lines changed

11 files changed

+55
-236
lines changed

.github/workflows/alembic.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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:15
11+
ports:
12+
- 5432:5432
13+
options: >-
14+
--health-cmd "pg_isready -U runner"
15+
--health-interval 10s
16+
--health-timeout 5s
17+
--health-retries 5
18+
env:
19+
POSTGRES_USER: runner
20+
POSTGRES_DB: main
21+
POSTGRES_HOST_AUTH_METHOD: trust
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Wait for PostgreSQL to be ready
27+
run: |
28+
until pg_isready -h localhost -p 5432 -U runner; do
29+
echo "Waiting for PostgreSQL..."
30+
sleep 1
31+
done
32+
33+
- name: Install dependencies
34+
run: |
35+
sudo apt-get install python3.11 python3.11-venv
36+
python3.11 -m pip install --upgrade pip
37+
python3.11 -m venv venv
38+
source ./venv/bin/activate
39+
pip install -r requirements.txt
40+
41+
# This will fail if there are divergent heads and alembic gets confused;
42+
# e.g., un-sanitarily merging main into a dev branch.
43+
- name: Run alembic upgrade head
44+
run: |
45+
source ./venv/bin/activate
46+
cd src
47+
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/cron.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@
33
# run the daily script at 1am every morning
44
# TODO: make sure timezone is PST
55
crontab -l | { cat; echo "0 1 * * * /home/csss-site/csss-site-backend/src/cron/daily.py"; } | crontab -
6-

config/csss-site.service

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

config/export_secrets.sh

Lines changed: 0 additions & 10 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.

0 commit comments

Comments
 (0)