GitHub Action Setup
Automatically enhance test coverage as part of your CI pipelines using Qodo Cover's GitHub Action.
Run Qodo Cover to extend existing test suites throughout the repository, in order to increase overall test coverage.
Trigger Qodo Cover on a code change, to ensure the new code is properly tested with good coverage.
Once Qodo Cover is added to your repository as a Github Action, it can be triggered in various scenarios: when a new PR is opened, on a scheduled basis, manually and more.
Learn more about Qodo Cover's GitHub Action in our GitHub repository:
Setup GitHub Action
Example Usage
Use Qodo's example repository to help you set up Qodo Cover GitHub Action:
Add the following to your workflow:
Inputs
github_token
GitHub token for authentication
Yes
N/A
project_language
Programming language of the project
No
python
project_root
Root directory of the project
No
.
code_coverage_report_path
Path to the coverage.xml file
No
./coverage.xml
test_command
Command to run tests (must generate coverage.xml)
Yes
N/A
model
LLM model name
No
gpt-4o
max_iterations
Maximum test generation attempts per file
No
3
desired_coverage
Target coverage percentage
No
100
Repository secret
Add OPENAI_API_KEY
to your repository secrets.
Note: This requirement is temporary. We will enable users to issue access tokens from their Qodo Portal in a future release.
Workflow permissions
For this action to work you must explicitly allow GitHub Actions to create pull requests. This setting can be found in a repository's settings under Actions > General > Workflow permissions.
Outputs
If the Qodo Cover agent succeeds in improving coverage it will comment on your PR with a link to a patch PR containing the new tests.
Last updated