Skip to content

Commit a25915b

Browse files
feat: Enhance CI/CD with mypy, Python 3.13, coverage, and docs workflow
- Add Python 3.13 to test matrix (now 3.10-3.13 × 3 OS = 12 jobs) - Add mypy type checking to lint job (non-blocking) - Add Codecov coverage upload on Ubuntu/3.11 - Add docs.yml workflow for MkDocs build and deploy - Add PR labeler for automatic labeling based on file changes - Add Dependabot for automated dependency updates (pip, actions, docker) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 1a604b6 commit a25915b

5 files changed

Lines changed: 217 additions & 4 deletions

File tree

.github/dependabot.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Dependabot configuration
2+
# See: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates
3+
4+
version: 2
5+
updates:
6+
# Python dependencies
7+
- package-ecosystem: "pip"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"
11+
day: "monday"
12+
open-pull-requests-limit: 5
13+
groups:
14+
dev-dependencies:
15+
patterns:
16+
- "pytest*"
17+
- "black"
18+
- "ruff"
19+
- "mypy"
20+
- "coverage"
21+
- "bandit"
22+
- "pre-commit"
23+
llm-providers:
24+
patterns:
25+
- "anthropic"
26+
- "openai"
27+
web-frameworks:
28+
patterns:
29+
- "fastapi"
30+
- "uvicorn"
31+
- "starlette"
32+
labels:
33+
- "dependencies"
34+
- "python"
35+
36+
# GitHub Actions
37+
- package-ecosystem: "github-actions"
38+
directory: "/"
39+
schedule:
40+
interval: "weekly"
41+
day: "monday"
42+
open-pull-requests-limit: 3
43+
labels:
44+
- "dependencies"
45+
- "ci"
46+
47+
# Docker (Dev Container)
48+
- package-ecosystem: "docker"
49+
directory: "/.devcontainer"
50+
schedule:
51+
interval: "monthly"
52+
labels:
53+
- "dependencies"
54+
- "devcontainer"

.github/labeler.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Label configuration for actions/labeler
2+
# See: https://github.com/actions/labeler
3+
4+
documentation:
5+
- changed-files:
6+
- any-glob-to-any-file:
7+
- 'docs/**/*'
8+
- '*.md'
9+
- 'mkdocs.yml'
10+
11+
tests:
12+
- changed-files:
13+
- any-glob-to-any-file:
14+
- 'tests/**/*'
15+
16+
core:
17+
- changed-files:
18+
- any-glob-to-any-file:
19+
- 'src/empathy_os/**/*'
20+
- 'empathy_llm_toolkit/**/*'
21+
22+
plugins:
23+
- changed-files:
24+
- any-glob-to-any-file:
25+
- 'empathy_software_plugin/**/*'
26+
- 'empathy_healthcare_plugin/**/*'
27+
28+
wizards:
29+
- changed-files:
30+
- any-glob-to-any-file:
31+
- 'coach_wizards/**/*'
32+
- 'wizards/**/*'
33+
34+
cli:
35+
- changed-files:
36+
- any-glob-to-any-file:
37+
- 'src/empathy_os/cli*.py'
38+
- 'empathy_llm_toolkit/cli/**/*'
39+
40+
ci:
41+
- changed-files:
42+
- any-glob-to-any-file:
43+
- '.github/**/*'
44+
45+
dependencies:
46+
- changed-files:
47+
- any-glob-to-any-file:
48+
- 'pyproject.toml'
49+
- 'requirements*.txt'
50+
51+
security:
52+
- changed-files:
53+
- any-glob-to-any-file:
54+
- 'empathy_llm_toolkit/security/**/*'
55+
- '.bandit'
56+
- '.github/workflows/security.yml'
57+
58+
devcontainer:
59+
- changed-files:
60+
- any-glob-to-any-file:
61+
- '.devcontainer/**/*'

.github/workflows/docs.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'docs/**'
8+
- 'mkdocs.yml'
9+
- '.github/workflows/docs.yml'
10+
pull_request:
11+
branches: [main]
12+
paths:
13+
- 'docs/**'
14+
- 'mkdocs.yml'
15+
workflow_dispatch:
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: '3.11'
27+
cache: 'pip'
28+
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install -e .[docs]
33+
34+
- name: Build documentation
35+
run: mkdocs build --strict
36+
37+
- name: Upload docs artifact
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: documentation
41+
path: site/
42+
43+
deploy:
44+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
45+
needs: build
46+
runs-on: ubuntu-latest
47+
permissions:
48+
contents: write
49+
steps:
50+
- uses: actions/checkout@v4
51+
with:
52+
fetch-depth: 0
53+
54+
- name: Set up Python
55+
uses: actions/setup-python@v5
56+
with:
57+
python-version: '3.11'
58+
cache: 'pip'
59+
60+
- name: Install dependencies
61+
run: |
62+
python -m pip install --upgrade pip
63+
pip install -e .[docs]
64+
65+
- name: Deploy to GitHub Pages
66+
run: mkdocs gh-deploy --force

.github/workflows/labeler.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: PR Labeler
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
11+
jobs:
12+
label:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/labeler@v5
16+
with:
17+
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/tests.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
os: [ubuntu-latest, macos-latest, windows-latest]
17-
python-version: ['3.10', '3.11', '3.12']
17+
python-version: ['3.10', '3.11', '3.12', '3.13']
1818

1919
steps:
2020
- uses: actions/checkout@v4
@@ -30,12 +30,22 @@ jobs:
3030
python -m pip install --upgrade pip
3131
pip install -e .[dev]
3232
33-
- name: Run tests
33+
- name: Run tests with coverage
3434
run: |
35-
pytest
35+
pytest --cov-report=xml
3636
env:
3737
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
3838

39+
- name: Upload coverage to Codecov
40+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
41+
uses: codecov/codecov-action@v4
42+
with:
43+
files: ./coverage.xml
44+
fail_ci_if_error: false
45+
verbose: true
46+
env:
47+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
48+
3949
lint:
4050
runs-on: ubuntu-latest
4151
steps:
@@ -50,14 +60,19 @@ jobs:
5060
- name: Install dependencies
5161
run: |
5262
python -m pip install --upgrade pip
53-
pip install black ruff bandit[toml]
63+
pip install black ruff bandit[toml] mypy
5464
5565
- name: Check formatting with Black
5666
run: black --check .
5767

5868
- name: Lint with Ruff
5969
run: ruff check .
6070

71+
- name: Type check with MyPy
72+
run: |
73+
mypy src/empathy_os empathy_llm_toolkit --ignore-missing-imports --no-error-summary || true
74+
continue-on-error: true # Non-blocking for now
75+
6176
- name: Security scan with Bandit
6277
run: bandit -c .bandit -r src/ empathy_llm_toolkit/ coach_wizards/ empathy_software_plugin/ --severity-level medium --confidence-level medium
6378

0 commit comments

Comments
 (0)