earlyai/Generate Tests with EarlyAI
Composite action to setup Node.js, install EarlyAI CLI, and generate tests
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| token | Token for committing and accessing PR information (defaults to github.token) | no | "" |
| api-key | API key for authenticating with the backend service | yes | — |
| pr-number | PR number (defaults to github.event.pull_request.number) | no | "" |
| head-ref | Head reference for the PR (defaults to github.head_ref or github.ref_name) | no | "" |
| base-ref | Base reference for the PR (defaults to github.base_ref) | no | "" |
| test-structure | Test file structure | no | siblingFolder |
| test-framework | Test framework to use | no | jest |
| test-suffix | Test file suffix | no | test |
| test-file-naming | Test file naming convention | no | camelCase |
| max-concurrency | Number of concurrent workers (1-4) | no | 3 |
| auto-commit | Whether to auto-commit files | no | true |
| test-command | Custom test command to run (must include $early_filename) | no | "" |
| coverage-command | Custom coverage command to run (must include --coverageReporters=json --coverageDirectory=$early_coverage_dir) | no | "" |
| lint-command | Custom lint command to run | no | "" |
| prettier-command | Custom prettier command to run | no | "" |
| base-host | Base host for the API endpoint | no | https://api.startearly.ai |
| node-options | Node.js options (e.g., --max-old-space-size=6240) | no | --max-old-space-size=6240 |
| changed-methods-only | Generate tests only for changed methods, not all methods in changed files | no | true |
| disable-lint-rules | Whether to disable failed lint rules in test files | no | "" |
| git-user-email | Git user email for auto commit | no | "" |
| git-user-name | Git user name for auto commit | no | "" |
| keep-error-tests | Whether to keep error tests | no | "" |
| keep-failed-tests | Whether to keep failed tests | no | "" |
| continue-on-test-errors | Whether to continue on test errors | no | true |
| skip-coverage-after | Whether to skip coverage after test generation | no | false |
| per-function-timeout | per function timeout in milliseconds | no | 360000 |
| remove-comments | Whether to remove comments from generated tests | no | true |
| coverage-threshold | Coverage threshold percentage (0-100) | no | 0 |
| max-testables | Maximum number of testables to generate (CLI caps at 10) | no | 0 |
| compress-output | Compress test runner output to reduce token consumption | no | true |
Outputs
no outputs