Skip to content
Merged
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
86 changes: 86 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: CI

# Runs on every pull request and on pushes to main. Pull requests from forks get no secrets.
on:
pull_request:
push:
branches: [main]

permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
tests:
name: tests (root and agents)
runs-on: ubuntu-latest
timeout-minutes: 20
services:
postgres:
image: pgvector/pgvector:pg17
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: signalscout_ui_test
ports: ["5432:5432"]
options: >-
--health-cmd "pg_isready -U test -d signalscout_ui_test"
--health-interval 5s --health-timeout 3s --health-retries 10
env:
TEST_DATABASE_URL: postgresql+psycopg://test:test@localhost:5432/signalscout_ui_test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: Install
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[test]"
- name: Root tests (PostgreSQL)
run: python -m pytest -q
- name: Agent tests
run: |
AGENT_TESTS=$(find agents -type d -name tests -not -path "*/signal-intelligence/*" -not -path "*/__pycache__/*" | sort)
PYTHONPATH=src:agents python -m pytest -q $AGENT_TESTS

signal-intelligence:
name: tests (signal-intelligence)
runs-on: ubuntu-latest
timeout-minutes: 20
services:
postgres:
image: pgvector/pgvector:pg17
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: signalscout_intelligence_test
ports: ["5432:5432"]
options: >-
--health-cmd "pg_isready -U test -d signalscout_intelligence_test"
--health-interval 5s --health-timeout 3s --health-retries 10
env:
DATABASE_URL: postgresql+psycopg://test:test@localhost:5432/signalscout_intelligence_test
SIGNAL_INTELLIGENCE_TEST_DATABASE_URL: postgresql+psycopg://test:test@localhost:5432/signalscout_intelligence_test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: Install
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[test]"
python -m pip install -r agents/signal-intelligence/requirements.txt
- name: Apply the application migrations
run: alembic upgrade head
- name: Signal-intelligence tests
working-directory: agents/signal-intelligence
env:
PYTHONPATH: ../../src:..
run: python -m pytest -q tests
Loading