Skip to main content
Redhat Developers  Logo
  • Products

    Platforms

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat AI
      Red Hat AI
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • See all Red Hat products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat Developer Hub
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat OpenShift Local
    • Red Hat Developer Sandbox

      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Red Hat OpenShift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • See all technologies
    • Programming languages & frameworks

      • Java
      • Python
      • JavaScript
    • System design & architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer experience

      • Productivity
      • Tools
      • GitOps
    • Automated data processing

      • AI/ML
      • Data science
      • Apache Kafka on Kubernetes
    • Platform engineering

      • DevOps
      • DevSecOps
      • Red Hat Ansible Automation Platform for applications and services
    • Secure development & architectures

      • Security
      • Secure coding
  • Learn

    Featured

    • Kubernetes & cloud native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • AI/ML
      AI/ML Icon
    • See all learning resources

    E-books

    • GitOps cookbook
    • Podman in action
    • Kubernetes operators
    • The path to GitOps
    • See all e-books

    Cheat sheets

    • Linux commands
    • Bash commands
    • Git
    • systemd commands
    • See all cheat sheets

    Documentation

    • Product documentation
    • API catalog
    • Legacy documentation
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore the Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

CodeCov and CodeRabbit in action for a SCLORG organization

April 23, 2026
Petr Hracek Pavol Sloboda
Related topics:
Artificial intelligenceContainersDeveloper toolsLinuxPython
Related products:
Red Hat AIRed Hat Enterprise Linux

    Analyzing and improving the quality of code should be one of the top priorities. AI brings a lot of positive and negative approaches. Our team recently needed to migrate our Bash container test suite, container-common-scripts (https://github.com/sclorg/container-common-scripts/), to a new Python-based CI suite (container-ci-suite). We would like to ensure that the code in container-ci-suite is well written and well covered by tests. We have decided to onboard two tools, CodeCov and CodeRabbit, into several repositories, such as container-ci-suite, ci-scripts and others. This article describes how to onboard a project and analyze the results.

    Get started

    CodeCov from code coverage works pretty smoothly. It perfectly detects what the code is really covered by tests. It does not generate the test code automatically. In case we would like to deliver a code that is shipped to customers, then the CodeCoverage should be added to all upstream projects. Let’s hit the issues as soon as possible, like shift left.

    Before onboarding the repositories to CodeCov there are two actions needed.

    First, log into app.codecov.io. Then, you will see all the onboarded projects. Figure 1 is an example of our onboarded projects.

    This shows the available projects in CodeCov.
    Figure 1: This page shows the available projects in your CodeCov.

    If you do not see your repo, then the CodeCov GitHub application is not installed on your GitHub Repo. To install it, go to the installation page. Select the organization or repos where you would like to install CodeCov GitHub application.

    Figure 2 shows how to install CodeCov in your whole organization or in specific repositories.

    Installing Codecov to GitHub repo or organization.
    Figure 2: Installing Codecov to your GitHub account or organization.

    Click the Install button. Once the you've installed the application, you will see it in your GitHub applications. You can see all installed application in your GitHub profile.

    Now let’s add CODECOV_TOKEN to your repository following these steps: 

    1. Go to your organization page api.codecov.io and select the repository you want to get the token. 

    2. The token is available in the Configuration -> General section. 

    3. Then copy the CODECOV_TOKEN to add to your repository or organization to the secrets variables.

    Deploy CodeCov

    In order to deploy CodeCov to your repository, you need to call it for each pull request by GitHub action. You can refer to this example.

    The GitHub action for the Python case will look like this:

    ---
    on:
      push:
        branches:
        - master
      pull_request:
        branches:
        - master
    name: Run Tox tests on daily-tests
    jobs:
      tox_test:
        strategy:
          matrix:
            tox_env: [py311, py312, py313, py314]
        runs-on: ubuntu-latest
        steps:
        - uses: actions/checkout@v2
        - uses: fedora-python/tox-github-action@main
          with:
            tox_env: ${{ matrix.tox_env }}
            workdir: “YOUR_PYTHON_WORKDIR” in our case "daily-tests/"
        - name: Upload coverage to Codecov
          uses: codecov/codecov-action@v5
          with:
            token: ${{ secrets.CODECOV_TOKEN }}
            flags: daily-tests-unit
            files: daily-tests/coverage.xml
            fail_ci_if_error: false

    As soon as this is pushed as a pull request, then you should see in onboarding pull request a comment. Figure 3 shows the CodeCov comment on a real pull request that the project is successfully onboarded.

    This shows the onboarding of Codecov.
    Figure 3: Codecov is onboarded.

    In case you do not see a message like this, look at the codecov web page and enable flags. Figure 4 shows how to enable flag analytics.

    Enable flag analytics on the CodeCov page.
    Figure 4: Enable flag analytics on the CodeCov page.

    As soon as you deployed this, then in your next pull request you should see a message from CodeCov. Figure 5 shows the Codecov report and how the project is covered by tests.

    CodeCov report and test coverage.
    Figure 5: The Codecov report and test coverage.

    Install CodeRabbit

    For open source repositories, you can use the free version of CodeRabbit; though this version has a limitation of four pull requests per user per day. You can activate this using the free trial option on the coderabbit.ai website. Afterwards, you choose whether you want to use it on GitLab or GitHub, add it to your organization, and you’re good to go. To use it in a repository, you just have to add it in the GitHub apps section of the repository settings.

    CodeRabbit settings and configuration

    The options provided by default are mostly acceptable but you can personalize the way the large language model interacts with the repository and pull requests to a surprising degree. This is done using yaml files named .coderabbit.yaml. These files work on an inherit-based hierarchy. The configuration affects all the subdirectories and files in the directory/repository of the config unless a specific option is overwritten by a config in said subdirectory. You can find all the specific options on the coderabbit website. 

    Experience with CodeCov

    Now in each pull request when a code is changed, CodeCov adds a comment about test coverage. Figure 6 shows how the changed code is covered. 

    This shows the test report.
    Figure 6: The report with uncovered changed lines by tests.

    That describes how much code is changed and how much code is covered by PyTest. Ideally it would be nice to use an AI in case users want to increase code quality. We want to update the code so it is covered by tests. Now you should go through the code that is missing. Click on a link in the Lines column and analyze what has to be covered.

    Experience with CodeRabbit

    We have tested CodeRabbit on multiple pull requests ranging from simple changes to the README to advanced Python code changes. This one was not ground breaking, but it was still interesting to see how CodeRabbit would handle working with changes that do not necessarily affect code, yet they still have to be concise and structured. This shows that CodeRabbit maintains the sanity of your project even beyond the code.

    The Figure 7 shows suggestions by CodeRabbit about consistency in the README.

    Suggestions by coderabbit in the README.md.
    Figure 7: Suggestions by CodeRabbit about consistency in the README.md.

    View the experiment with a Dockerfile and how CodeRabbit AI handles the FROM directive of the Dockerfile. Figure 8 shows how the CodeRabbit AI suggest changes in a Dockerfile.

    Suggestions by coderabbit in a Dockerfile.
    Figure 8: Suggestions by CodeRabbit about the FROM command reliability in a Dockerfile.

    What was a pleasant surprise was that CodeRabbit scans the entire file when a change is made to it, therefore uncovering potential issues even outside the scope of the changes inside the pull request. The results from these experiments were quite surprising, even uncovering an issue with passwords stored inside the Python code.

    CodeRabbit automatically generates a summary even if a user adds a summary. Figure 9 shows the automatically generated summary in a real pull request.

    The summary generated by CodeRabbit AI.
    Figure 9: The summary of a pull request generated by CodeRabbit.

    Prompts for other AI agents

    CodeRabbit AI also creates prompts for other AI agents whenever it detects a new find. This can be used to double check the suggested changes and the finds themselves with other agents easily.

    Figure 10 shows a prompt for other AI agents.

    The coderabbit prompt for other agents.
    Figure 10: This prompt for other agents is about a change in the from command in a Dockerfile generated by CodeRabbit.

    Final thoughts

    CodeCov is a great tool to use with CodeRabbit AI to bump your projects to a higher level. But before applying any changes to the code please look for them and do not apply them automatically. As you can see, you can use the CodeCov and CodeRabbit for analyzing your pull request before merging them. We strongly recommend not merging or even proposing the fixes caught by CodeRabbit automatically. Think about whether the code is really useful or not. Both tools can help you with the analysis either where the test coverage is missing and how your code is perfect, or the location of the gaps. Sometimes it can really hit the big issues.

    This article is important for the Red Hat Enterprise Linux system and Red Hat AI since it describes how to maintain code quality and style to meet enterprise standards.

    Related Posts

    • Improve code quality and security with PatchPatrol

    • Leverage AI for root-cause analysis with MCP servers in VS Code and Cursor

    • Why some agentic AI developers are moving code from Python to Rust

    • Batch inference on OpenShift AI with Ray Data, vLLM, and CodeFlare

    Recent Posts

    • Introducing Apache Tomcat 10.1 in RHEL 10

    • Deploy OpenViking on OpenShift AI to improve AI agent memory

    • Zero trust observability: Integrating OpenTelemetry with workload identity manager

    • CodeCov and CodeRabbit in action for a SCLORG organization

    • How we rewrote a production UI without stopping it

    What’s up next?

    Learning Path Ansible LP_featured_image

    Get started with the Ansible Visual Studio Code extension

    Take a guided walkthrough of the Ansible extension for Visual Studio...
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue