Skip to content

Commit ab185e0

Browse files
shunfuashwin-ant
authored andcommitted
allow claude gh action to lint, typecheck, and run tests (anthropics#115)
Co-authored-by: Ashwin Bhat <ashwin@anthropic.com> Signed-off-by: Rushil Patel <rpatel@codegen.com>
1 parent 6e10b6d commit ab185e0

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.github/workflows/claude.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ jobs:
2929
with:
3030
fetch-depth: 1
3131

32+
- name: Set up Python
33+
uses: actions/setup-python@v5
34+
with:
35+
python-version: '3.12'
36+
37+
- name: Install dependencies
38+
run: |
39+
python -m pip install --upgrade pip
40+
pip install -e ".[dev]"
41+
3242
- name: Run Claude Code
3343
id: claude
3444
uses: anthropics/claude-code-action@beta
@@ -44,8 +54,12 @@ jobs:
4454
# Optional: Trigger when specific user is assigned to an issue
4555
# assignee_trigger: "claude-bot"
4656

47-
# Optional: Allow Claude to run specific commands
48-
# allowed_tools: "Bash(npm install),Bash(npm run build),Bash(npm run test:*),Bash(npm run lint:*)"
57+
# Allow Claude to run linters, typecheckers, and tests
58+
allowed_tools: |
59+
Bash(python -m ruff check:*)
60+
Bash(python -m ruff format:*)
61+
Bash(python -m mypy:*)
62+
Bash(python -m pytest *)
4963
5064
# Optional: Add custom instructions for Claude to customize its behavior for your project
5165
# custom_instructions: |

0 commit comments

Comments
 (0)