Skip to content

feat: Update website with v4.4.0 messaging consistency #480

feat: Update website with v4.4.0 messaging consistency

feat: Update website with v4.4.0 messaging consistency #480

Workflow file for this run

name: Tests
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
- name: Run tests with coverage
run: |
pytest --cov=src/empathy_os --cov-report=xml --cov-report=term-missing --cov-fail-under=53 -m "not network"
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
- name: Run new Phase 1 tests
run: |
pytest tests/unit/memory/test_long_term_security.py \
tests/unit/cli/test_cli_commands.py \
tests/unit/scanner/test_file_traversal.py \
tests/unit/cache/test_eviction_policies.py \
tests/integration/test_api_endpoints.py \
tests/unit/workflows/test_workflow_execution.py \
-v --tb=short
- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
fail_ci_if_error: false
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black ruff bandit[toml] mypy
- name: Check formatting with Black
run: black --check .
- name: Lint with Ruff
run: ruff check .
- name: Type check with MyPy
run: |
mypy src/empathy_os empathy_llm_toolkit --ignore-missing-imports --no-error-summary || true
continue-on-error: true # Non-blocking for now
- name: Security scan with Bandit
run: bandit -c .bandit -r src/ empathy_llm_toolkit/ coach_wizards/ empathy_software_plugin/ --severity-level medium --confidence-level medium
platform-compat:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Check cross-platform compatibility
id: compat
run: |
python scripts/check_platform_compat.py src/ --json > compat-report.json
python scripts/check_platform_compat.py src/ --fix
- name: Upload compatibility report
uses: actions/upload-artifact@v4
with:
name: platform-compat-report
path: compat-report.json
- name: Fail on errors (non-blocking for now)
run: |
ERRORS=$(python -c "import json; r=json.load(open('compat-report.json')); print(r['summary']['errors'])")
if [ "$ERRORS" -gt 0 ]; then
echo "::warning::Found $ERRORS cross-platform compatibility errors"
fi
continue-on-error: true
code-quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[software]
- name: Count tech debt markers
id: debt
run: |
# Count TODO, FIXME, HACK, XXX markers
DEBT_COUNT=$(grep -rE "(TODO|FIXME|HACK|XXX):" --include="*.py" src/ empathy_llm_toolkit/ empathy_software_plugin/ empathy_os/ 2>/dev/null | wc -l || echo 0)
echo "debt_count=$DEBT_COUNT" >> $GITHUB_OUTPUT
echo "Found $DEBT_COUNT tech debt markers"
# Warn if above threshold (configurable)
THRESHOLD=400
if [ "$DEBT_COUNT" -gt "$THRESHOLD" ]; then
echo "::warning::Tech debt count ($DEBT_COUNT) exceeds threshold ($THRESHOLD)"
fi
- name: Upload debt report
uses: actions/upload-artifact@v4
with:
name: tech-debt-report
path: |
patterns/tech_debt/
build:
runs-on: ubuntu-latest
needs: [test, lint]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build package
run: python -m build
- name: Check package
run: twine check dist/*
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: dist-packages
path: dist/