Skip to content

Commit 2545467

Browse files
Acquartsclaude
andcommitted
ci: add mypy, security scanning, and coverage to CI pipeline
Add type checking (mypy), security scanning (bandit), dependency audit (pip-audit), and test coverage with codecov upload. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 06a94e0 commit 2545467

3 files changed

Lines changed: 33 additions & 1 deletion

File tree

.github/workflows/gaming-assistant-ci.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,27 @@ jobs:
3939
ruff check .
4040
ruff format --check .
4141
42+
- name: Type check with mypy
43+
run: |
44+
mypy my_agent/ app/ --ignore-missing-imports
45+
46+
- name: Security scan with bandit
47+
run: |
48+
bandit -r my_agent/ app/ -f json -o bandit-report.json --exit-zero
49+
bandit -r my_agent/ app/ -ll
50+
51+
- name: Dependency audit
52+
run: |
53+
pip-audit --strict --desc on 2>&1 || true
54+
4255
- name: Run tests
4356
env:
4457
GOOGLE_GENAI_USE_VERTEXAI: "False"
4558
run: |
46-
pytest tests/ -v
59+
pytest tests/ -v --cov=my_agent --cov=app --cov-report=xml
60+
61+
- name: Upload coverage
62+
uses: codecov/codecov-action@v4
63+
with:
64+
file: ai-gaming-assistant-agent/coverage.xml
65+
fail_ci_if_error: false

ai-gaming-assistant-agent/.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ jobs:
3434
run: |
3535
mypy my_agent/ app/ --ignore-missing-imports
3636
37+
- name: Security scan with bandit
38+
run: |
39+
bandit -r my_agent/ app/ -f json -o bandit-report.json --exit-zero
40+
bandit -r my_agent/ app/ -ll
41+
42+
- name: Dependency audit
43+
run: |
44+
pip-audit --strict --desc on 2>&1 || true
45+
3746
- name: Run tests
3847
env:
3948
GOOGLE_GENAI_USE_VERTEXAI: "False"

ai-gaming-assistant-agent/requirements-dev.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ mypy>=1.9.0
1111

1212
# Type stubs
1313
types-requests>=2.31.0
14+
15+
# Security
16+
bandit>=1.7.0
17+
pip-audit>=2.7.0

0 commit comments

Comments
 (0)