CodeBeaver Cloud can be triggered by a GitHub Action
CodeBeaver can be triggered by a GitHub Action to automatically generate unit tests for your code changes. The action analyzes your code changes and creates comprehensive test suites, helping maintain high test coverage with minimal effort. To get started, follow these steps:
After you signed up for CodeBeaver, get your CodeBeaver API key from the Team page.
Add the API key to your repository’s secrets:
CODEBEAVER_API_KEY
Create a workflow file (e.g., .github/workflows/codebeaver.yml
):
The action supports different operation modes through the action-type
parameter:
analyze
: Analyzes changes and provides test results and bug detection analysis as a PR commentanalyze-and-generate
: Does everything analyze
does, plus generates test files and creates a new PR with the changesdry-run
: Performs analysis and shows what would be generated without making any changesYou can customize the behavior with these parameters:
Input | Description | Required | Default |
---|---|---|---|
api-key | CodeBeaver API Key | Yes | N/A |
action-type | Type of action to perform | No | ”analyze-and-generate” |
repository | Repository in owner/repo format | No | Current repository |
pr-number | Pull request number | No | Current PR number (empty for push events) |
commit_sha | Commit SHA to analyze | No | Current commit SHA |
For example, to analyze a specific PR in another repository:
Check out the README in the GitHub Action repo for more information.
CodeBeaver Cloud can be triggered by a GitHub Action
CodeBeaver can be triggered by a GitHub Action to automatically generate unit tests for your code changes. The action analyzes your code changes and creates comprehensive test suites, helping maintain high test coverage with minimal effort. To get started, follow these steps:
After you signed up for CodeBeaver, get your CodeBeaver API key from the Team page.
Add the API key to your repository’s secrets:
CODEBEAVER_API_KEY
Create a workflow file (e.g., .github/workflows/codebeaver.yml
):
The action supports different operation modes through the action-type
parameter:
analyze
: Analyzes changes and provides test results and bug detection analysis as a PR commentanalyze-and-generate
: Does everything analyze
does, plus generates test files and creates a new PR with the changesdry-run
: Performs analysis and shows what would be generated without making any changesYou can customize the behavior with these parameters:
Input | Description | Required | Default |
---|---|---|---|
api-key | CodeBeaver API Key | Yes | N/A |
action-type | Type of action to perform | No | ”analyze-and-generate” |
repository | Repository in owner/repo format | No | Current repository |
pr-number | Pull request number | No | Current PR number (empty for push events) |
commit_sha | Commit SHA to analyze | No | Current commit SHA |
For example, to analyze a specific PR in another repository:
Check out the README in the GitHub Action repo for more information.