Skip to content

chore: remove dead code, bloat, and redundant documentation #12

chore: remove dead code, bloat, and redundant documentation

chore: remove dead code, bloat, and redundant documentation #12

Workflow file for this run

# SuperClaude CI Pipeline
# Fail-fast quality gates with matrix testing across Python 3.8-3.12
name: CI
on:
push:
branches: [main, master, develop]
pull_request:
branches: ['**']
permissions:
contents: read
jobs:
# ============================================
# Quality Gate - Fast fail on style/lint issues
# ============================================
quality:
name: Quality Gate
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install quality tools
run: |
python -m pip install --upgrade pip
pip install ruff mypy types-PyYAML types-requests types-aiofiles
- name: Ruff lint check
run: ruff check . --output-format=github
- name: Ruff format check
run: ruff format --check .
- name: MyPy type check (non-blocking)
run: mypy SuperClaude --ignore-missing-imports || echo "::warning::MyPy found type issues"
continue-on-error: true
# ============================================
# Test Matrix - Python 3.8 through 3.12
# ============================================
test:
name: Test (Python ${{ matrix.python-version }})
needs: quality
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- name: Checkout repository
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 ".[test]"
pip install pytest-cov pytest-asyncio
- name: Run tests with coverage
env:
SUPERCLAUDE_OFFLINE_MODE: "1"
run: |
pytest tests/ -m "not slow and not integration" \
--cov=SuperClaude \
--cov-report=xml \
--cov-report=term-missing \
--tb=short \
-v
- name: Upload coverage artifact
if: matrix.python-version == '3.11'
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage.xml
retention-days: 7
- name: Upload coverage to Codecov
if: 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 }}
# ============================================
# Coverage Gate - Enforce 80% threshold
# ============================================
coverage-gate:
name: Coverage Gate (45%)
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
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 ".[test]"
pip install pytest-cov pytest-asyncio
- name: Check coverage threshold
env:
SUPERCLAUDE_OFFLINE_MODE: "1"
run: |
# Coverage threshold lowered to 45% to match current state
# Target: incrementally increase to 80%
pytest tests/ -m "not slow and not integration" \
--cov=SuperClaude \
--cov-fail-under=45 \
--tb=short \
-q
# ============================================
# Build Verification - Ensure package builds
# ============================================
build:
name: Build Check
needs: quality
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build package
run: python -m build
- name: Check package with twine
run: twine check dist/*
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
retention-days: 7
# ============================================
# Benchmark Smoke Test
# ============================================
benchmark:
name: Benchmark Smoke
needs: quality
runs-on: ubuntu-latest
steps:
- name: Checkout repository
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 ".[test]"
- name: Run benchmark smoke harness
run: python benchmarks/run_benchmarks.py --suite smoke
continue-on-error: true
# ============================================
# CI Summary - Aggregate status
# ============================================
ci-status:
name: CI Status
if: always()
needs: [quality, test, coverage-gate, build]
runs-on: ubuntu-latest
steps:
- name: Check CI status
run: |
if [[ "${{ needs.quality.result }}" == "failure" ]] || \
[[ "${{ needs.test.result }}" == "failure" ]] || \
[[ "${{ needs.coverage-gate.result }}" == "failure" ]] || \
[[ "${{ needs.build.result }}" == "failure" ]]; then
echo "CI failed"
exit 1
fi
echo "CI passed"