Skip to content

fix: Correct memory tier diagram (livegrep → SQLite for cold tier) #6

fix: Correct memory tier diagram (livegrep → SQLite for cold tier)

fix: Correct memory tier diagram (livegrep → SQLite for cold tier) #6

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# Python Memory MCP Server
python-test:
name: Python Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: python
strategy:
matrix:
python-version: ["3.10", "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-${{ matrix.python-version }}-${{ hashFiles('python/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run linting (ruff)
run: ruff check memory_mcp
- name: Run formatting check (black)
run: black --check memory_mcp
- name: Run type checking (mypy)
run: mypy memory_mcp --ignore-missing-imports
continue-on-error: true # Don't fail on type errors initially
- name: Run tests with coverage
run: pytest --cov=memory_mcp --cov-report=xml --cov-report=term-missing
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
if: matrix.python-version == '3.11'
with:
files: ./python/coverage.xml
flags: python
fail_ci_if_error: false
# TypeScript Extensions (OpenClaw memory bridge)
typescript-test:
name: TypeScript Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Get pnpm store directory
shell: bash
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Cache pnpm dependencies
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install OpenClaw dependencies
working-directory: openclaw
run: pnpm install --frozen-lockfile
continue-on-error: true # May not have lockfile yet
- name: Run TypeScript type check
working-directory: openclaw
run: pnpm tsc --noEmit
continue-on-error: true
- name: Run tests
working-directory: openclaw
run: pnpm test
continue-on-error: true
# VS Code Extension (CAIIDE++ Onboarding)
vscode-extension:
name: VS Code Extension
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
working-directory: CAIIDE++/extensions/caiide-onboarding
run: npm install
- name: Compile TypeScript
working-directory: CAIIDE++/extensions/caiide-onboarding
run: npm run compile
- name: Run linting
working-directory: CAIIDE++/extensions/caiide-onboarding
run: npm run lint
continue-on-error: true
# Shell Scripts Validation
shell-check:
name: Shell Scripts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install shellcheck
run: sudo apt-get install -y shellcheck
- name: Run shellcheck on scripts
run: |
find scripts -name "*.sh" -type f | xargs shellcheck --severity=warning || true
shellcheck install.sh --severity=warning || true
- name: Test resource detection
run: |
chmod +x scripts/detect-resources.sh
./scripts/detect-resources.sh --profile
- name: Test secret generation (dry run)
run: |
chmod +x scripts/generate-env.sh
TEST_DIR=$(mktemp -d)
CLAUDE_CODE_PP_DIR="$TEST_DIR" ./scripts/generate-env.sh
test -f "$TEST_DIR/.env"
rm -rf "$TEST_DIR"
# Docker Compose Validation
docker-validate:
name: Docker Compose
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate docker-compose.yaml
run: |
# Set required environment variables
export NEO4J_PASSWORD=test
export REDIS_PASSWORD=test
export LITELLM_MASTER_KEY=sk-litellm-test
export ANTHROPIC_API_KEY=""
export OPENAI_API_KEY=""
docker compose -f docker/docker-compose.yaml config > /dev/null
# Integration Tests (requires services)
integration-test:
name: Integration Tests
runs-on: ubuntu-latest
needs: [python-test, shell-check]
services:
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
working-directory: python
run: |
pip install -e ".[redis,dev]"
- name: Run integration tests
working-directory: python
run: pytest tests/ -m integration --redis-url redis://localhost:6379
continue-on-error: true # May not have integration tests yet
env:
REDIS_URL: redis://localhost:6379
- name: Run install script tests
run: ./scripts/test-install.sh