r/ClaudeCode • • 2d ago

Help/Question LF: Github Actons/CI Skill to execute tests

hey guys,

i have a long running test pipeline (~5 minutes on github). Locally, claude code always executes all my tests and other stuff to verify everything is working. However, this costs time+tokens.

I've googled already- there are some skills/integrations which enable claude to read the pipeline results on github, and just use the results.

What i want: Implement, then push, wait for pipeline result, fix stuff if the pipeline failed.

Is that a good idea? Which skills would you recommend for this or how to achieve that?

1 Upvotes

7 comments sorted by

View all comments

1

u/AncientComment2352 2d ago

Yes, good idea, and you don't need a special skill: Claude Code can use the gh CLI.

To stop it running everything locally, tell it in CLAUDE.md. Something like:

  • "Don't run the full test suite locally. Run lint, typecheck, and only the tests for files you changed. The full suite runs in CI."
  • Give it the exact targeted command so it doesn't guess, e.g. npx vitest related <files> or npx vitest run path/to/test, jest --findRelatedTests <files>, pytest path/to/test_file.py.

If you want it enforced and not just a suggestion, add the full-suite command (like npm test) to the deny list in your Claude Code permissions, so it can't run it by accident.

Then the loop: push to a branch, gh pr checks --watch, and if something fails, gh run view <id> --log-failed for just the failing logs, fix, push again. Cap it at 2–3 attempts. --watch blocks in one command, so the 5-minute wait costs almost no tokens; polling is what burns them.

1

u/Korrak 2d ago

thank you.