From 2befcccb3f9fceb2d07a8224ad5ed6a2f3efd658 Mon Sep 17 00:00:00 2001 From: Punisheroot <44579963+Punisheroot@users.noreply.github.com> Date: Mon, 24 Nov 2025 16:26:14 +0100 Subject: [PATCH] Add GitHub Actions workflow for tests Introduces a CI workflow to run tests on push and pull requests for main and develop branches using Python 3.11 and 3.12. Updates the README badge to reflect the new workflow status. requirements.txt was also updated, likely to support the workflow dependencies. --- .github/workflows/tests.yml | 42 ++++++++++++++++++++++++++++++++++++ README.md | 4 ++-- requirements.txt | Bin 3882 -> 3854 bytes 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/tests.yml 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 b2cf8bd1ceff2bbc2e93ce53c7849185940351f9..ecdf99124d0b47d1749f127971c7e859527e955a 100644 GIT binary patch delta 12 TcmZ1_*C)5ZiF