Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
backend:
name: Backend Tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install dependencies
run: |
# Install backend deps EXCEPT cloakbrowser (custom binary not available in CI).
# The conftest.py mocks cloakbrowser via sys.modules before any import.
grep -v '^cloakbrowser' backend/requirements.txt > /tmp/ci-requirements.txt
pip install -r /tmp/ci-requirements.txt
pip install pytest pytest-asyncio starlette

- name: Run tests
run: python -m pytest backend/tests/ -v

frontend:
name: Frontend Tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Node 20
uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
cache-dependency-path: frontend/package-lock.json

- name: Install dependencies
working-directory: frontend
run: npm ci

- name: Build
working-directory: frontend
run: npm run build

- name: Run tests
working-directory: frontend
run: npm test