spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / .github / workflows / mod-tests.yml
40 lines · 1.1 KBRaw
1name: "Mod tests"
2
3on:
4 pull_request:
5 paths:
6 - "mods/**"
7 - ".github/workflows/mod-tests.yml"
8
9permissions:
10 contents: read
11
12jobs:
13 test:
14 runs-on: ubuntu-latest
15 steps:
16 - name: Checkout repository
17 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
18 with:
19 persist-credentials: false
20
21 - name: Install Claude Code and TypeScript
22 run: npm install -g @anthropic-ai/claude-code typescript@5.9.3
23
24 - name: Typecheck each mod's hooks and tests
25 run: tsc -p mods/tsconfig.json
26
27 - name: Run each mod's tests
28 run: |
29 if ! claude plugin test --help 2>/dev/null | grep -q '^Usage: claude plugin test'; then
30 echo "claude $(claude --version) has no 'plugin test' yet; skipping the test step"
31 exit 0
32 fi
33 status=0
34 for mod in mods/*/; do
35 [ -d "$mod/tests" ] || continue
36 claude plugin test "$mod" || status=1
37 done
38 exit $status
39 env:
40 CLAUDE_CODE_ENABLE_FUNCTION_HOOKS: "1"