diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..14eba2e --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,42 @@ +name: Tests + +on: + push: + branches: [ main, ci-test ] + pull_request: + branches: [ main, ci-test ] + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.11', '3.12'] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Cache pip dependencies + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install pytest pytest-cov + python -m spacy download en_core_web_sm + + - name: Run tests with coverage + run: | + pytest tests/ -v --cov=src/cortex --cov-report=xml --cov-report=term diff --git a/README.md b/README.md index ffbb2cc..f66680f 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ **Version:** 1.0 (Production-Ready Hybrid Stack) [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/) -[![Tests](https://img.shields.io/badge/tests-40%2F40%20passing-brightgreen.svg)](./tests/) +[![Tests](https://github.com/IASolutionOrg/Cortex/actions/workflows/tests.yml/badge.svg)](https://github.com/IASolutionOrg/Cortex/actions/workflows/tests.yml) [![Docker](https://img.shields.io/badge/docker-ready-blue.svg)](./Dockerfile) [![MCP](https://img.shields.io/badge/MCP-Enabled-purple.svg)](https://modelcontextprotocol.io/) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE) @@ -167,7 +167,7 @@ Generate your own dashboard with the `visualize_brain` tool or run the demo: ```bash python demo_scenario.py -# Opens demo_dashboard.html automatically +# Open demo_dashboard.html manually ``` --- diff --git a/requirements.txt b/requirements.txt index b2cf8bd..ecdf991 100644 Binary files a/requirements.txt and b/requirements.txt differ