Skip to content

Commit 62ceda8

Browse files
authored
feat: ship remote scanning and reporting upgrades
2 parents d9a905a + ff6438b commit 62ceda8

10 files changed

Lines changed: 629 additions & 115 deletions

File tree

.github/workflows/verify.yml

Lines changed: 46 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,60 +2,72 @@ name: Verify Roast CLI
22

33
on:
44
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
paths:
9+
- '.github/workflows/verify.yml'
10+
- 'README.md'
11+
- 'pyproject.toml'
12+
- 'roast/**'
13+
- 'tests/**'
14+
pull_request:
15+
paths:
16+
- '.github/workflows/verify.yml'
17+
- 'README.md'
18+
- 'pyproject.toml'
19+
- 'roast/**'
20+
- 'tests/**'
21+
22+
permissions:
23+
contents: read
524

625
jobs:
726
verify:
827
runs-on: ubuntu-latest
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
python-version: ['3.11', '3.12']
32+
933
steps:
1034
- name: Checkout
1135
uses: actions/checkout@v4
1236

1337
- name: Setup Python
1438
uses: actions/setup-python@v5
1539
with:
16-
python-version: '3.11'
40+
python-version: ${{ matrix.python-version }}
1741

1842
- name: Install
1943
run: |
2044
python -m pip install --upgrade pip
2145
pip install -e .
2246
pip install pytest
2347
24-
- name: Run analyzer tests
25-
run: pytest tests/test_analyzer.py
48+
- name: Run test suite
49+
run: pytest -q
50+
51+
- name: CLI smoke test (local path + config + JSON + fail-under)
52+
run: roast . --no-llm --max-files 12 --include-config --json-output roast-report.json --fail-under 1
2653

27-
- name: CLI smoke test (local path)
28-
run: roast . --no-llm --max-files 10
54+
- name: Validate JSON report schema
55+
run: |
56+
python - <<'PY'
57+
import json
58+
with open('roast-report.json', encoding='utf-8') as fh:
59+
data = json.load(fh)
60+
assert 'summary' in data
61+
assert 'counts' in data
62+
assert 'hotspots' in data
63+
assert 'issues' in data
64+
assert 'share' in data
65+
assert 'Overall' in data['summary']['scores']
66+
PY
2967
3068
- name: CLI smoke test (GitHub URL path)
3169
run: roast https://github.com/psf/requests --no-llm --max-files 10
3270

33-
- name: CLI smoke test (LLM Groq primary + NIM backup)
34-
env:
35-
GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}
36-
NVIDIA_NIM_API_KEY: ${{ secrets.NVIDIA_NIM_API_KEY }}
37-
run: |
38-
if [ -z "$GROQ_API_KEY" ] && [ -z "$NVIDIA_NIM_API_KEY" ]; then
39-
echo "No LLM secrets configured; skipping LLM smoke test."
40-
exit 0
41-
fi
42-
roast . --max-files 8 \
43-
--provider auto \
44-
--model llama-3.3-70b-versatile \
45-
--backup-provider nim \
46-
--backup-model microsoft/phi-4-mini-instruct
47-
48-
- name: CLI smoke test (forced NIM fallback)
49-
env:
50-
GROQ_API_KEY: invalid
51-
NVIDIA_NIM_API_KEY: ${{ secrets.NVIDIA_NIM_API_KEY }}
52-
run: |
53-
if [ -z "$NVIDIA_NIM_API_KEY" ]; then
54-
echo "No NIM secret configured; skipping fallback smoke test."
55-
exit 0
56-
fi
57-
roast . --max-files 8 \
58-
--provider auto \
59-
--model llama-3.3-70b-versatile \
60-
--backup-provider nim \
61-
--backup-model microsoft/phi-4-mini-instruct
71+
- name: Note on LLM smoke coverage
72+
if: matrix.python-version == '3.11'
73+
run: echo "Provider-backed LLM smoke remains manual to keep verify.yml deterministic. Use roast-famous.yml for secret-backed LLM checks."

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ export GROQ_API_KEY="your-groq-key"
2424
export NVIDIA_NIM_API_KEY="your-nim-key"
2525
```
2626

27+
If you want to roast a private GitHub repository by URL, also set:
28+
29+
```bash
30+
export GITHUB_TOKEN="your-github-token"
31+
```
32+
2733
Default model choices in this project:
2834
- Primary: `llama-3.3-70b-versatile` (Groq)
2935
- Backup: `microsoft/phi-4-mini-instruct` (NIM)
@@ -33,6 +39,7 @@ Default model choices in this project:
3339
```bash
3440
roast ./my-project
3541
roast https://github.com/user/repo
42+
roast https://github.com/user/repo/tree/main --no-llm
3643
roast ./my-project --no-llm --output report.html
3744
```
3845

@@ -43,6 +50,20 @@ roast ./my-project --provider groq --model llama-3.3-70b-versatile
4350
roast ./my-project --provider auto --backup-provider nim --backup-model microsoft/phi-4-mini-instruct
4451
```
4552

53+
CI and machine-readable output:
54+
55+
```bash
56+
roast ./my-project --no-llm --json-output roast-report.json
57+
roast ./my-project --no-llm --fail-under 70
58+
roast ./my-project --no-llm --include-config --max-files 80
59+
```
60+
61+
What changed in `0.2.0`:
62+
- GitHub URL scans now download repo archives instead of cloning full git history.
63+
- Private GitHub repo URLs work when `GITHUB_TOKEN` is configured.
64+
- HTML reports now include hotspot summaries and interactive issue filters.
65+
- JSON report export and `--fail-under` make the CLI usable in CI.
66+
4667
## Demo
4768

4869
![roast-my-code demo](./demo.gif)
@@ -57,4 +78,4 @@ _Recorded with VHS._
5778

5879
## Contributing
5980

60-
Contributions are welcome. Open an issue for bugs/ideas, then submit a PR with tests for behavior changes.
81+
Contributions are welcome. Open an issue for bugs or ideas, then submit a PR with tests for behavior changes. The main verification workflow now runs on pushes and pull requests that touch the CLI, reporter, scanner, or tests.

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "roast-my-code"
7-
version = "0.1.0"
7+
version = "0.2.0"
88
description = "A brutally honest, funny AI-powered code quality roaster"
99
readme = "README.md"
1010
requires-python = ">=3.11"
1111
dependencies = [
1212
"typer[all]",
1313
"rich",
1414
"openai",
15-
"gitpython",
1615
"jinja2",
1716
]
1817

0 commit comments

Comments
 (0)