release: Bump version to 2.1.3 with dependency updates #37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| name: Test Python ${{ matrix.python-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| 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 -e ".[dev,embeddings,mcp]" | |
| - name: Lint with ruff | |
| run: | | |
| ruff check memdocs/ tests/ | |
| - name: Check formatting with black | |
| run: | | |
| black --check memdocs/ tests/ | |
| - name: Type check with mypy | |
| run: | | |
| mypy memdocs/ --ignore-missing-imports | |
| continue-on-error: true # Don't fail build yet, just warn | |
| - name: Run tests (excluding API tests) | |
| run: | | |
| pytest -m "not api" --cov=memdocs --cov-report=xml --cov-report=term-missing -v | |
| - name: Check coverage threshold | |
| run: | | |
| python -c "import xml.etree.ElementTree as ET; tree = ET.parse('coverage.xml'); coverage = float(tree.getroot().attrib['line-rate']) * 100; print(f'Coverage: {coverage:.1f}%'); exit(0 if coverage >= 65 else 1)" | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: ./coverage.xml | |
| fail_ci_if_error: false | |
| verbose: true | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| security: | |
| name: Security Scan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pip-audit | |
| - name: Run security audit | |
| run: | | |
| pip-audit | |
| docs: | |
| name: Documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Check README | |
| run: | | |
| if [ ! -f README.md ]; then | |
| echo "README.md not found" | |
| exit 1 | |
| fi | |
| if [ ! -s README.md ]; then | |
| echo "README.md is empty" | |
| exit 1 | |
| fi | |
| - name: Check CHANGELOG | |
| run: | | |
| if [ ! -f CHANGELOG.md ]; then | |
| echo "CHANGELOG.md not found" | |
| exit 1 | |
| fi |