Skip to content

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.

TypeScript

mods: a workflow typechecks each mod's hooks and tests and runs the tests with claude plugin test on pull requests

poteat9e7b3917f181
diff --git a/.github/workflows/mod-tests.yml b/.github/workflows/mod-tests.yml
new file mode 100644
index 00000000..adbd750b
--- /dev/null
+++ b/.github/workflows/mod-tests.yml
@@ -0,0 +1,36 @@
+name: "Mod tests"
+
+on:
+ pull_request:
+ paths:
+ - "mods/**"
+ - ".github/workflows/mod-tests.yml"
+
+permissions:
+ contents: read
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
+ with:
+ persist-credentials: false
+
+ - name: Install Claude Code and TypeScript
+ run: npm install -g @anthropic-ai/claude-code [email protected]
+
+ - name: Typecheck each mod's hooks and tests
+ run: tsc -p mods/tsconfig.json
+
+ - name: Run each mod's tests
+ run: |
+ status=0
+ for mod in mods/*/; do
+ [ -d "$mod/tests" ] || continue
+ claude plugin test "$mod" || status=1
+ done
+ exit $status
+ env:
+ CLAUDE_CODE_ENABLE_FUNCTION_HOOKS: "1"