211 lines
6.6 KiB
YAML
211 lines
6.6 KiB
YAML
# Full Stack Testing - SmartTools + Orchestrated Discussions + Artifact Editor
|
|
#
|
|
# Quick Start:
|
|
# docker-compose build # Build all images
|
|
# docker-compose run --rm test-all # Run all tests
|
|
# docker-compose run --rm discussions discussions --help
|
|
#
|
|
# Prerequisites:
|
|
# All three repos cloned to ~/PycharmProjects/
|
|
# - SmartTools
|
|
# - orchestrated-discussions
|
|
# - artifact-editor
|
|
|
|
version: '3.8'
|
|
|
|
services:
|
|
# ============================================================================
|
|
# SmartTools - Foundation Layer
|
|
# ============================================================================
|
|
smarttools:
|
|
build:
|
|
context: ../SmartTools
|
|
dockerfile: Dockerfile
|
|
image: smarttools:latest
|
|
volumes:
|
|
- smarttools-data:/root/.smarttools
|
|
command: ["smarttools", "list"]
|
|
|
|
smarttools-test:
|
|
build:
|
|
context: ../SmartTools
|
|
dockerfile: Dockerfile
|
|
image: smarttools:latest
|
|
volumes:
|
|
- smarttools-data:/root/.smarttools
|
|
command: ["pytest", "-v"]
|
|
|
|
# ============================================================================
|
|
# Orchestrated Discussions - Middle Layer
|
|
# ============================================================================
|
|
discussions:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: orchestrated-discussions:latest
|
|
volumes:
|
|
- smarttools-data:/root/.smarttools
|
|
- ./examples:/app/examples:ro
|
|
- ./templates:/app/templates:ro
|
|
command: ["discussions", "--help"]
|
|
|
|
discussions-test:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: orchestrated-discussions:latest
|
|
volumes:
|
|
- smarttools-data:/root/.smarttools
|
|
command: ["pytest", "-v", "tests/"]
|
|
|
|
# ============================================================================
|
|
# Artifact Editor - Top Layer
|
|
# ============================================================================
|
|
artifact-editor:
|
|
build:
|
|
context: ../artifact-editor
|
|
dockerfile: Dockerfile
|
|
image: artifact-editor:latest
|
|
volumes:
|
|
- smarttools-data:/root/.smarttools
|
|
- /tmp/artifacts:/tmp/artifacts
|
|
command: ["artifact-ai", "--help"]
|
|
|
|
# ============================================================================
|
|
# GUI Services (require X11 forwarding)
|
|
# ============================================================================
|
|
discussions-gui:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: orchestrated-discussions:latest
|
|
environment:
|
|
- DISPLAY=${DISPLAY:-:0}
|
|
volumes:
|
|
- smarttools-data:/root/.smarttools
|
|
- ./examples:/app/examples
|
|
- /tmp/.X11-unix:/tmp/.X11-unix:ro
|
|
command: ["discussions", "ui"]
|
|
network_mode: host
|
|
|
|
artifact-editor-gui:
|
|
build:
|
|
context: ../artifact-editor
|
|
dockerfile: Dockerfile
|
|
image: artifact-editor:latest
|
|
environment:
|
|
- DISPLAY=${DISPLAY:-:0}
|
|
- QT_QPA_PLATFORM=xcb
|
|
volumes:
|
|
- smarttools-data:/root/.smarttools
|
|
- /tmp/artifacts:/tmp/artifacts
|
|
- /tmp/.X11-unix:/tmp/.X11-unix:ro
|
|
command: ["artifact-editor"]
|
|
network_mode: host
|
|
|
|
# ============================================================================
|
|
# Full Test Suite
|
|
# ============================================================================
|
|
test-all:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: orchestrated-discussions:latest
|
|
volumes:
|
|
- smarttools-data:/root/.smarttools
|
|
- ./examples:/app/examples:ro
|
|
command: >
|
|
bash -c "
|
|
set -e
|
|
echo '========================================'
|
|
echo ' FULL STACK TEST SUITE'
|
|
echo '========================================'
|
|
echo ''
|
|
|
|
echo '=== 1. SmartTools Foundation ==='
|
|
smarttools list | head -10
|
|
echo 'SmartTools: OK'
|
|
echo ''
|
|
|
|
echo '=== 2. Discussion SmartTools ==='
|
|
discussion-parser --help > /dev/null
|
|
discussion-vote-counter --help > /dev/null
|
|
echo 'Discussion tools: OK'
|
|
echo ''
|
|
|
|
echo '=== 3. Artifact SmartTools ==='
|
|
artifact-ai --help > /dev/null
|
|
artifact-export --help > /dev/null
|
|
echo 'Artifact tools: OK'
|
|
echo ''
|
|
|
|
echo '=== 4. Discussions CLI ==='
|
|
discussions --help > /dev/null
|
|
discussions participants
|
|
echo 'Discussions CLI: OK'
|
|
echo ''
|
|
|
|
echo '=== 5. Unit Tests ==='
|
|
pytest -v tests/ || echo 'Some tests failed'
|
|
echo ''
|
|
|
|
echo '=== 6. Pipeline Test ==='
|
|
cat examples/brainstorm_notification_system.discussion.md | discussion-parser | jq -r '.title'
|
|
cat examples/brainstorm_notification_system.discussion.md | discussion-parser | discussion-vote-counter | jq .
|
|
echo 'Pipeline: OK'
|
|
echo ''
|
|
|
|
echo '=== 7. Artifact Generation Test ==='
|
|
echo '' | timeout 10 artifact-ai --format plantuml --instruction 'Create a simple A to B diagram' 2>/dev/null || echo 'AI test skipped (no provider or timeout)'
|
|
echo ''
|
|
|
|
echo '========================================'
|
|
echo ' ALL TESTS COMPLETED'
|
|
echo '========================================'
|
|
"
|
|
|
|
# ============================================================================
|
|
# Interactive Shell
|
|
# ============================================================================
|
|
shell:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: orchestrated-discussions:latest
|
|
volumes:
|
|
- smarttools-data:/root/.smarttools
|
|
- ./examples:/app/examples
|
|
- ../artifact-editor:/artifact-editor:ro
|
|
- ../SmartTools:/SmartTools:ro
|
|
command: ["/bin/bash"]
|
|
stdin_open: true
|
|
tty: true
|
|
|
|
volumes:
|
|
smarttools-data:
|
|
# Persists ~/.smarttools between container runs
|
|
|
|
# ==============================================================================
|
|
# Quick Reference
|
|
# ==============================================================================
|
|
#
|
|
# Build everything:
|
|
# docker-compose build
|
|
#
|
|
# Run tests:
|
|
# docker-compose run --rm test-all
|
|
# docker-compose run --rm smarttools-test
|
|
# docker-compose run --rm discussions-test
|
|
#
|
|
# Use CLI tools:
|
|
# docker-compose run --rm discussions discussions new "Test Feature" --template feature
|
|
# docker-compose run --rm discussions discussions status examples/feature_discussion.discussion.md
|
|
# docker-compose run --rm artifact-editor artifact-ai --format mermaid --instruction "Create flowchart"
|
|
#
|
|
# Launch GUI (requires: xhost +local:docker):
|
|
# docker-compose run --rm discussions-gui
|
|
# docker-compose run --rm artifact-editor-gui
|
|
#
|
|
# Interactive shell:
|
|
# docker-compose run --rm shell
|