Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,11 @@ jobs:
lint:
name: Lint & Static Analysis
uses: ./.github/workflows/lint.yml

test:
name: Tests
uses: ./.github/workflows/tests.yaml

docs:
name: Docs Build
uses: ./.github/workflows/docs-build.yaml
46 changes: 46 additions & 0 deletions .github/workflows/docs-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# ===============================================================
# Docs Build - Verify documentation builds without errors
# ===============================================================

name: Docs Build

on:
workflow_call:
push:
branches: ["main"]
paths:
- "docs/**"
- ".github/workflows/docs-build.yaml"
pull_request:
types: [opened, synchronize, ready_for_review]
branches: ["main"]
paths:
- "docs/**"
- ".github/workflows/docs-build.yaml"

permissions:
contents: read

jobs:
docs-build:
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
name: Hugo Build
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Checkout source
uses: actions/checkout@v5
with:
submodules: recursive
fetch-depth: 1

- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: "latest"
extended: true

- name: Build docs
working-directory: docs
run: hugo --minify
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Deploy Documentation to GitHub Pages
# ===============================================================

name: Docs
name: Docs Deploy

on:
push:
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# ===============================================================
# Tests - Run the test suite
# ===============================================================

name: Tests

on:
workflow_call:
push:
branches: ["main"]
paths:
- "cpex/**"
- "tests/**"
- "pyproject.toml"
- ".github/workflows/tests.yaml"
pull_request:
types: [opened, synchronize, ready_for_review]
branches: ["main"]
paths:
- "cpex/**"
- "tests/**"
- "pyproject.toml"
- ".github/workflows/tests.yaml"
workflow_dispatch:

permissions:
contents: read

jobs:
test:
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
os: [ubuntu-latest]

name: "Python ${{ matrix.python-version }}"
runs-on: ${{ matrix.os }}
timeout-minutes: 30

steps:
- name: Checkout source
uses: actions/checkout@v5
with:
fetch-depth: 1

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: pip

- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip install -e ".[dev,all]"

- name: Run tests
run: |
PYTHONPATH=cpex pytest -n auto tests
2 changes: 1 addition & 1 deletion docs/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ type: docs

# CPEX

**A lightweight, composable plugin framework for building extensible AI systems.**
**A lightweight plugin framework for building extensible AI systems**

CPEX lets you intercept, enforce, and extend application behavior through plugins — without modifying core logic. Define hook points in your application, write plugins that attach to them, and compose enforcement pipelines that run automatically.

Expand Down
14 changes: 8 additions & 6 deletions tests/unit/cpex/tools/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from unittest.mock import MagicMock, patch

# We use typer's CliRunner for testing typer apps
import click
from typer.testing import CliRunner

# Third-Party
Expand Down Expand Up @@ -124,12 +125,13 @@ def test_help_exits_zero(self):

def test_help_contains_options(self):
result = runner.invoke(app, ["bootstrap", "--help"])
assert "--destination" in result.output
assert "--template_type" in result.output
assert "--template_url" in result.output
assert "--vcs_ref" in result.output
assert "--no_input" in result.output
assert "--dry_run" in result.output
output = click.unstyle(result.output)
assert "--destination" in output
assert "--template_type" in output
assert "--template_url" in output
assert "--vcs_ref" in output
assert "--no_input" in output
assert "--dry_run" in output


class TestBootstrapDryRun:
Expand Down
Loading