Skip to content

Commit ed2f661

Browse files
authored
Merge branch 'main' into feature/karpathy-lab-init
2 parents 2f0c512 + 59d2a30 commit ed2f661

File tree

9 files changed

+355
-232
lines changed

9 files changed

+355
-232
lines changed

.github/workflows/ci-cd-fixed.yml

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

.github/workflows/ci-cd.yml

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

.github/workflows/deploy.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: CD – Deploy to Railway
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Install Railway CLI
15+
run: |
16+
curl -fsSL https://railway.app/install.sh | sh
17+
18+
- name: Deploy to Railway
19+
env:
20+
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
21+
run: railway up --ci

.github/workflows/lint.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: CI - Lint
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
lint:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- uses: actions/setup-python@v5
14+
with:
15+
python-version: "3.11"
16+
17+
- name: Install linting tools
18+
run: pip install black isort autoflake
19+
20+
- name: Run Black
21+
run: black --check app
22+
23+
- name: Run isort
24+
run: isort --check-only app

.github/workflows/security.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: CI – Security Scan
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches:
8+
- "feature/**"
9+
10+
jobs:
11+
security:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Setup Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.11"
21+
22+
- name: Install security tooling
23+
run: pip install bandit safety
24+
25+
- name: Run Bandit
26+
run: bandit -r app -ll
27+
28+
- name: Dependency vulnerability scan
29+
run: safety check -r requirements.txt || true

.github/workflows/test.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI – Test Suite
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches:
8+
- "feature/**"
9+
10+
jobs:
11+
tests:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: "3.11"
22+
23+
- name: Install dependencies
24+
run: |
25+
pip install --upgrade pip
26+
pip install -r requirements.txt
27+
pip install pytest pytest-asyncio pytest-cov
28+
29+
- name: Run unit tests
30+
run: pytest -q --disable-warnings --maxfail=1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,4 @@ safety-report.json
6161
NeuroBank-FastAPI-Toolkit-1/
6262

6363
neurobank-fastapi.code-workspace
64+
neurobank-fastapi.code-workspace

app/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Settings(BaseSettings):
1515
app_version: str = "1.0.0"
1616

1717
# Server Configuration
18-
host: str = "0.0.0.0"
18+
host: str = "0.0.0.0" # nosec B104
1919
port: int = int(os.getenv("PORT", 8000))
2020

2121
# Environment Configuration

0 commit comments

Comments
 (0)