From 58b5a41a1505ee99bce7ac68e5a63b943a2157e2 Mon Sep 17 00:00:00 2001 From: Sam Fu Date: Wed, 6 Aug 2025 15:29:34 -0700 Subject: [PATCH] allow claude gh action to lint, typecheck, and run tests (#115) Co-authored-by: Ashwin Bhat --- .github/workflows/claude.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index 8f085a0..92b0f22 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -29,6 +29,16 @@ jobs: with: fetch-depth: 1 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -e ".[dev]" + - name: Run Claude Code id: claude uses: anthropics/claude-code-action@beta @@ -44,8 +54,12 @@ jobs: # Optional: Trigger when specific user is assigned to an issue # assignee_trigger: "claude-bot" - # Optional: Allow Claude to run specific commands - # allowed_tools: "Bash(npm install),Bash(npm run build),Bash(npm run test:*),Bash(npm run lint:*)" + # Allow Claude to run linters, typecheckers, and tests + allowed_tools: | + Bash(python -m ruff check:*) + Bash(python -m ruff format:*) + Bash(python -m mypy:*) + Bash(python -m pytest *) # Optional: Add custom instructions for Claude to customize its behavior for your project # custom_instructions: |