Skip to content

Add explicit OPTIONS routes for CORS preflight (Railway) #10

Add explicit OPTIONS routes for CORS preflight (Railway)

Add explicit OPTIONS routes for CORS preflight (Railway) #10

Workflow file for this run

name: Backend CI
on:
push:
paths:
- "backend/**"
- ".github/workflows/backend-ci.yml"
pull_request:
paths:
- "backend/**"
- ".github/workflows/backend-ci.yml"
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: papermind
ports:
- "5432:5432"
options: >-
--health-cmd="pg_isready -U postgres"
--health-interval=10s
--health-timeout=5s
--health-retries=5
redis:
image: redis:7
ports:
- "6379:6379"
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/papermind
REDIS_URL: redis://localhost:6379/0
GEMINI_API_KEY: dummy
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
working-directory: backend
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest
- name: Run tests
working-directory: backend
run: pytest