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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file added .coverage
Binary file not shown.
79 changes: 79 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
###############################################################################
# Keep essential runtime files
###############################################################################

# Project structure needed at runtime
backend/
python/
webui/
plugins/
prompts/
agents/
conf/
usr/
run_ui.py
initialize.py
agent.py
models.py

# Keep .gitkeep markers
!**/.gitkeep


###############################################################################
# Development / Build files (not needed in Docker image)
###############################################################################

# Git
.git/
.github/

# Tests & Docs
tests/
docs/
AGENTS.md
README.md
LICENSE

# Config (dev only)
pyproject.toml
uv.lock

# Python
*.pyc
*.pyo
*.pyd
__pycache__/
*.egg-info/
.ruff_cache/
.mypy_cache/
.pytest_cache/
.hypothesis/

# IDE
.vscode/
.idea/
.cursor/
.windsurf/

# Virtual environments
.venv/
.conda/

# Environment & Logs
.env
*.log
logs/

# Temp / Cache
tmp/
.cache/
*.tmp
*.bak

# OS
.DS_Store
Thumbs.db

# Root test files
*.test.py
15 changes: 0 additions & 15 deletions .editorconfig

This file was deleted.

2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto eol=lf
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: ctxos
38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

35 changes: 0 additions & 35 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/ci.yml

This file was deleted.

123 changes: 123 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: CI/CD Pipeline

on:
push:
branches: [ main, testing, development ]
pull_request:
branches: [ main, testing, development ]

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

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true

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

- name: Install dependencies
run: uv sync --extra dev

- name: Run linter
run: uv run ruff check .

- name: Run type checker
run: uv run ruff check . --select=FA,PERF,UP --diff

test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true

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

- name: Install dependencies
run: pip3 install -r requirements.txt

- name: Run unit tests
env:
CTX_WS_DEBUG: "0"
run: uv run pytest --no-cov -q

build-and-push:
name: Build and Push Docker Image
needs: test
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/testing' || github.ref == 'refs/heads/development')
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ctxos/ctxai
tags: |
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
type=raw,value=${{ github.ref_name }}
type=semver,pattern={{version}},value=0.1.0,enable=${{ github.ref == 'refs/heads/main' }}

- name: Build and push
uses: docker/build-push-action@v6
with:
context: docker/run
file: docker/run/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
build-args: |
BRANCH=${{ github.ref_name }}
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

publish-pypi:
name: Publish to PyPI
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true

- name: Build and publish
run: |
uv build
uv publish
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
Loading
Loading