---
title: "Tech Tip #63: Add an energy check to CI"
description: "Your CI catches slow code. Does it catch hungry code?"
url: https://greencode.ai/tech-tips/63-energy-test-in-ci/
---

# Tech Tip #63: Add an energy check to CI

**Your CI catches slow code. Does it catch hungry code?**

[Watch the video](https://media.greencode.ai/shorts/energy-test-in-ci-59597e6f952c.mp4)

Video created by [explainapaper.com](https://explainapaper.com/?utm_source=greencode.ai&utm_medium=film&utm_campaign=made-by)

### The problem

Pipelines test correctness and sometimes performance, but energy regressions slip through for months. The research shows energy checks in CI are feasible; almost nobody runs them.

### The fix you can use today

- Measure a fixed scenario's energy in CI on the same runner every time.
- Set a threshold and flag builds that exceed it.
- Repeat runs to separate a real regression from noise.

GreenCode researchers found that energy checks can run in CI just like speed checks, but few teams do it.

### Tools that help

- [Eco CI](https://github.com/green-coding-solutions/eco-ci-energy-estimation?utm_source=greencode.ai&utm_medium=referral&utm_campaign=greencode): estimates the energy of CI pipeline runs on GitHub Actions and GitLab, per step
- [Green Metrics Tool](https://github.com/green-coding-solutions/green-metrics-tool?utm_source=greencode.ai&utm_medium=referral&utm_campaign=greencode): measures the energy of whole software scenarios run in containers, so runs can be repeated and compared
- [GreenFrame](https://github.com/marmelab/greenframe-cli?utm_source=greencode.ai&utm_medium=referral&utm_campaign=greencode): measures the footprint of a web application's user scenarios and enforces carbon budgets in CI

### How GreenCode helps

GreenCode helps tackle this by building the test scenario for you: a load test generated from the system's own endpoints that records energy as well as speed and ranks the hotspots by energy. [More on this](https://greencode.ai/feature/automated-performance-testing/).

### Tags

#ci-cd#testing#measurement

### Sources

- [GreenCode State of the Art Review, D2.1 (2025), PDF p. 74: energy measurement can be embedded in CI to detect energy regressions like performance regressions (Eco CI)](https://greencode.ai/publications/d2-1-state-of-the-art-review/)
- [GreenCode State of the Art Review, D2.1 (2025), PDF p. 42: energy and performance regression gates in CI/CD remain under-integrated](https://greencode.ai/publications/d2-1-state-of-the-art-review/)
- [W3C, Web Sustainability Guidelines: monitor performance across every release cycle](https://www.w3.org/TR/web-sustainability-guidelines/#performance-testing)

[All GreenCode Tech Tips](https://greencode.ai/tech-tips/)

#### Key Facts

- Tip **#63**
- For **Ops and infrastructure**
- Category **Testing, CI and code quality**
- Format **short video**
![GreenCode](https://greencode.ai/wp-content/uploads/2024/12/greencode-logo-website-small-colours-2.webp)

Want this checked on your own system? Talk to the GreenCode team.

[Get in touch](https://greencode.ai/contact/)
