Skip to content

Commit 7f7c36b

Browse files
ChengaDevclaude
andcommitted
Add CI workflow and strengthen contributing guidelines
- Run pytest on Python 3.10/3.11/3.12 on every push and PR - Require tests for all PRs in CONTRIBUTING section of README Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e405430 commit 7f7c36b

2 files changed

Lines changed: 39 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
name: Tests (Python ${{ matrix.python-version }})
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
python-version: ["3.10", "3.11", "3.12"]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
cache: pip
24+
25+
- name: Install dependencies
26+
run: pip install -e ".[all-providers]"
27+
28+
- name: Run tests
29+
run: pytest tests/ -v --tb=short

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -593,14 +593,21 @@ Environment variables: `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GOOGLE_API_KEY`,
593593
594594
## Contributing
595595
596-
Contributions are welcome. Some good first areas:
596+
Contributions are welcome. Please open an issue first for anything beyond a small bug fix so we can align on direction before you invest time in a PR.
597+
598+
### Requirements for every PR
599+
600+
- **Tests are mandatory.** Every change to behaviour must include tests. PRs without tests covering the new or changed code will not be merged.
601+
- All existing tests must continue to pass (`pytest tests/ -v`).
602+
- Keep new dependencies minimal — ask in an issue if you're unsure.
603+
604+
### Good first areas
597605

598606
- **New MCP servers** — Jira, PagerDuty, Datadog log fetcher, `kubectl` live pod state
599607
- **New log patterns** — add to `_PATTERNS` in `log_analyzer.py` with a matching fixture and test
600-
- **GitHub Actions step summary** — write the RCA to `$GITHUB_STEP_SUMMARY`
601608
- **Streaming output** — stream Claude's reasoning in real time
602609

603-
To add a new issue pattern:
610+
### Adding a new log pattern
604611

605612
1. Add a `(regex, IssueKind, group_index)` entry to `_PATTERNS` in `mcp_tools/log_analyzer.py`
606613
2. Add a realistic fixture log to `tests/fixtures/`

0 commit comments

Comments
 (0)