Skip to content

docs: align provider and maintenance guidance #642

docs: align provider and maintenance guidance

docs: align provider and maintenance guidance #642

Workflow file for this run

# CI - Run tests on every push and PR
#
# This ensures all PRs pass tests before merging to main.
# Tests run on multiple Python versions for compatibility.
#
# Jobs:
# 1. pre-commit: Code quality checks (formatting, linting, secrets)
# 2. test: Unit tests on Python 3.10-3.12
# 3. coverage: Test coverage reporting
name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
# Code quality checks
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Run pre-commit
uses: pre-commit/action@v3.0.1
node-test:
runs-on: ubuntu-latest
needs: pre-commit
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: mcp-sse-server/package-lock.json
- name: Install dependencies
working-directory: mcp-sse-server
run: npm ci
- name: Run tests
working-directory: mcp-sse-server
run: npm test
test:
runs-on: ubuntu-latest
needs: pre-commit
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 }}
cache: "pip"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Lint with flake8
run: |
# Stop the build if there are Python syntax errors or undefined names
flake8 app.py automem/ --count --select=E9,F63,F7,F82 --show-source --statistics
# Exit-zero treats all errors as warnings (for now)
flake8 app.py automem/ --count --exit-zero --max-line-length=100 --statistics
- name: Run tests
run: |
pytest tests/ -v --ignore=tests/benchmarks
# Optional: Run on a single version with coverage
coverage:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install pytest-cov
- name: Run tests with coverage
run: |
pytest tests/ -v --ignore=tests/benchmarks --cov=automem --cov=app --cov-report=xml
- name: Upload coverage reports
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false