π οΈ Troubleshooting β Early-Catch (GitHub Action)
This page focuses on pull requestβbased troubleshooting when using the earlyai/pull-request-test-generation GitHub Action or the Early CLI for Python PR test generation.
For shared issues like memory, token, commit, or coverage errors β see Fundamentals Troubleshooting β.
β No Test Files Generatedβ
This can happen for several different reasons, ranging from configuration or permissions issues to already-covered code.
- JavaScript / TypeScript
- Python
Please go through the checklist step by step in π Why No Tests Were Generated
That guide explains every possible cause β including missing CLI installation, coverage command failures, validation errors, SCM permissions, and more β along with how to fix each one.
Common causes for Python projects:
- No
.pyfiles changed in the PR β The agent only generates tests for Python files that were modified in the pull request - No testable functions β The agent generates tests for top-level functions and class methods. Files with only imports, constants, or type definitions will be skipped
- py-agent not installed β Make sure
py-agentis installed:pip install py-agent - API key or token issues β Verify your
API_KEYandTOKENare valid - TEST_FRAMEWORK not set β Ensure
TEST_FRAMEWORK=pytestis set in your environment
β οΈ Jest Command failsβ
Note: This section applies to JavaScript/TypeScript projects only.
π Auth Errorsβ
See API Key Missing β And GitHub Token Issues β
π Permissions Not Setβ
Make sure your workflow includes:
permissions:
contents: write
pull-requests: write
π« Action Doesn't Triggerβ
Check the event type in your workflow:
on:
pull_request:
types: [opened, reopened, ready_for_review]
π py-agent Not Found (Python)β
If you see an error like py-agent is not installed, install it with:
pip install py-agent
The py-agent package is required in addition to the @earlyai/cli npm package when generating tests for Python projects.
π§ͺ No Testable Files in PRβ
- JavaScript / TypeScript
- Python
TBD
The agent generates tests for top-level functions and class methods. If the PR only contains changes to imports, constants, type definitions, or configuration files, no tests will be generated.
π₯ Memory or Heap Limit Errorsβ
Note: This section applies to JavaScript/TypeScript projects only. Python test generation does not require
NODE_OPTIONSmemory tuning.
β Commit Push Rejectedβ
See Git Push or Commit Rejected β
π More Helpβ
- Fundamentals Troubleshooting β
- Slack (for invited teams)
- Email us at support@startearly.ai