Conversation
There was a problem hiding this comment.
🟡 Not ready to approve
The new workflow as written will fail on schedule because it invokes non-existent project files/commands (e.g., requirements.txt and pytest) and needs adjustment to match the repo’s actual validation/test entrypoints.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
Adds a new scheduled GitHub Actions workflow intended to run daily tests while capturing energy measurements via Eco-CI.
Changes:
- Introduces
.github/workflows/eco-ci.ymlwith a daily cron trigger. - Adds Eco-CI start/measurement/result display steps around checkout + Python setup + test execution.
File summaries
| File | Description |
|---|---|
| .github/workflows/eco-ci.yml | New scheduled workflow to run a daily job with Eco-CI energy estimation instrumentation. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 3
- Review effort level: Low
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
There was a problem hiding this comment.
🟡 Not ready to approve
The new workflow is currently invalid/misconfigured (permissions YAML format) and would fail at runtime due to missing dependency/test setup (nonexistent requirements.txt, pytest not present/used in repo).
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Review details
Comments suppressed due to low confidence (3)
.github/workflows/eco-ci.yml:38
- This workflow installs dependencies with
pip install -r requirements.txt, but the repository does not have a rootrequirements.txt(it usesdocs/requirements.txt+uvin.github/workflows/validate.yml). As written, the job will fail at install time.
- name: setup python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
with:
python-version: '3.10'
cache: 'pip'
.github/workflows/eco-ci.yml:53
- The job runs
pytest, but there are no pytest tests/config in this repo (anddocs/requirements.txtdoesn’t include pytest). This will fail or do nothing meaningful; consider running the existing validation command instead.
- name: Run Tests
shell: bash
run: pytest
.github/workflows/eco-ci.yml:44
- Spelling: "Measurment" → "Measurement" (step name).
- name: Setup Python Measurment
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Low
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
Use uv
Replace astral-sh/setup-uv v7 to v9.0.0
There was a problem hiding this comment.
🟡 Not ready to approve
The workflow currently installs a non-existent root requirements.txt and runs pytest even though pytest/tests aren’t present/installed in this repo, so scheduled runs will fail.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Review details
Comments suppressed due to low confidence (4)
.github/workflows/eco-ci.yml:9
permissions: read-allis broader than needed for this workflow (it only checks out the repo and runs scripts). Prefer least-privilege permissions, consistent with other workflows in this repo.
permissions:
read-all
.github/workflows/eco-ci.yml:53
pytestis invoked here, but there are no Python tests/pytest configuration in the repo, anddocs/requirements.txtdoesn’t install pytest. This step will fail (likelypytest: command not found). If the intent is to run the repo’s existing Python checks, run the provider validator script instead (same asvalidate.yml).
- name: Run Tests
shell: bash
run: pytest
.github/workflows/eco-ci.yml:44
- Spelling: “Measurment” → “Measurement”.
- name: Setup Python Measurment
.github/workflows/eco-ci.yml:60
- After replacing the test command with provider validation, this measurement label should be updated to match what’s actually being measured (otherwise the results will be misleading).
- name: Tests measurement
uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0
with:
task: get-measurement
label: 'pytest'
continue-on-error: true
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Low
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Not ready to approve
The new scheduled workflow will fail as written due to referencing a non-existent requirements.txt and invoking pytest despite no pytest tests/deps in the repo.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Review details
Comments suppressed due to low confidence (4)
.github/workflows/eco-ci.yml:42
- This workflow installs dependencies from
requirements.txt, but the repository doesn't have that file (the existing validation workflow installs fromdocs/requirements.txt). This will fail before any measurements/tests run.
run: uv pip install -r requirements.txt
.github/workflows/eco-ci.yml:59
- After switching away from
pytest, this measurement step name/label still references pytest, which makes the energy report misleading.
- name: Tests measurement
uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0
with:
task: get-measurement
label: 'pytest'
.github/workflows/eco-ci.yml:44
- Typo in step name: "Measurment" → "Measurement".
- name: Setup Python Measurement
.github/workflows/eco-ci.yml:9
permissions: read-allgrants broader token access than this workflow appears to need (it only checks out code and runs commands). Minimizing permissions reduces blast radius if a third-party action is compromised.
permissions:
contents: read
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Low
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
There was a problem hiding this comment.
🟡 Not ready to approve
The new eco-ci.yml workflow currently references a non-existent requirements.txt and runs pytest despite no test suite being present, so it will fail and not perform meaningful checks.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Review details
Comments suppressed due to low confidence (2)
.github/workflows/eco-ci.yml:53
pytestis invoked here, but there are no Python test files in the repository andpytestis not installed by the listed requirements, so this step will fail and the workflow won’t exercise any of the repo’s existing validation checks.
- name: Run Tests
shell: bash
run: pytest
.github/workflows/eco-ci.yml:42
- This workflow installs dependencies from
requirements.txt, but the repository only containsdocs/requirements.txt, so the step will fail on a fresh runner.
- name: Install dependencies
run: uv pip install -r requirements.txt
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Low
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
Add Eco CI steps
There was a problem hiding this comment.
🟡 Not ready to approve
The new eco-ci results job can run before measurement jobs complete, which can lead to incomplete or empty displayed results.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Review details
Comments suppressed due to low confidence (1)
.github/workflows/ci.yml:127
- The
eco-cijob runs withoutneeds, so it can start in parallel withbuild/axe-core/lighthouseand may display incomplete (or empty) results because those jobs’get-measurementsteps haven’t finished yet. Makeeco-cidepend on the measurement-producing jobs (and considerif: always()so results still display when an upstream job fails).
eco-ci:
runs-on: ubuntu-latest
steps:
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Low
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
There was a problem hiding this comment.
🟡 Not ready to approve
The Eco CI integration currently won’t reliably display measurements on failures and includes a standalone results job that cannot display any measurements due to job isolation.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Review details
Comments suppressed due to low confidence (6)
.github/workflows/ci.yml:94
display-resultsshould also run underif: always()so energy output is still printed even when earlier steps fail.
- name: Show Energy Results
uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0
with:
task: display-results
continue-on-error: true
.github/workflows/ci.yml:136
display-resultsshould run underif: always()so energy output is still printed even when Lighthouse fails.
- name: Show Energy Results
uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0
with:
task: display-results
continue-on-error: true
.github/workflows/ci.yml:44
- The build job records a measurement but never runs
display-results, so energy output for the build segment won’t be shown. Also, withoutif: always(), this step will be skipped if a prior step fails (even though the Eco-CI step itself iscontinue-on-error).
uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0
with:
task: get-measurement
label: 'build'
continue-on-error: true
.github/workflows/ci.yml:88
- If the axe-core run fails, these Eco-CI steps won’t execute unless they’re marked
if: always(), so the measurement output can be lost exactly when it’s most useful for debugging CI regressions.
This issue also appears on line 89 of the same file.
- name: Get measurement
uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0
with:
task: get-measurement
label: 'axe-core'
continue-on-error: true
.github/workflows/ci.yml:130
- If Lighthouse fails, these Eco-CI steps won’t run unless they’re marked
if: always(), so the workflow can miss energy output for failing runs.
This issue also appears on line 131 of the same file.
- name: Get measurement
uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0
with:
task: get-measurement
label: 'lighthouse'
continue-on-error: true
.github/workflows/ci.yml:144
- This separate
eco-cijob runsdisplay-resultswithout any priorstart-measurement/get-measurementsteps in the same job; GitHub Actions jobs are isolated, so this won’t have any measurements to display and will just consume runner time (and is currently masked bycontinue-on-error).
eco-ci:
runs-on: ubuntu-latest
steps:
- name: Show Energy Results
uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0
with:
task: display-results
continue-on-error: true
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Low
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
There was a problem hiding this comment.
🟡 Not ready to approve
The Eco CI result collection/display steps and the eco-ci summary job are currently configured in a way that can skip or run too early, leading to missing/incomplete results.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Review details
Comments suppressed due to low confidence (4)
.github/workflows/ci.yml:92
- Same as above: if
Serve site and run axe-corefails, the energy measurement collection/display steps will be skipped unless they useif: always().
- name: Get measurement
uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0
with:
task: get-measurement
label: 'axe-core'
.github/workflows/ci.yml:134
- Same as above: if
Lighthouse analysisfails, the energy measurement steps won’t run unless they useif: always().
- name: Get measurement
uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0
with:
task: get-measurement
label: 'lighthouse'
.github/workflows/ci.yml:49
- The energy measurement steps won’t run if an earlier step in the job fails (default
if: success()behavior). If the intent is to always collect/display energy metrics even on failures, addif: always()to both theget-measurementanddisplay-resultssteps.
This issue also appears in the following locations of the same file:
- line 88
- line 130
- name: Get measurement
uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0
with:
task: get-measurement
label: 'build'
.github/workflows/ci.yml:150
- The
eco-cijob runs without anyneeds, so it can start before the other jobs finish and may display incomplete/empty results. If it’s meant to be a workflow-level summary, make it depend on the other jobs and run regardless of their outcome.
eco-ci:
runs-on: ubuntu-latest
steps:
- name: Show Energy Results
uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Low
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
Eco CI Output - Old Energy EstimationEco CI Output [RUN-ID: 30561351138]:
🌳 CO2 Data: Total cost of whole PR so far: |
|||||||||||||||||||||||||||||||||||
Eco CI Output - Old Energy EstimationEco CI Output [RUN-ID: 30561351138]:
🌳 CO2 Data: Total cost of whole PR so far: |
|||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
🟡 Not ready to approve
The updated CI workflow permissions and the Eco CI reporting steps need adjustments to avoid breaking checkout/permissions and to ensure measurement/reporting behaves reliably across push vs PR runs and failure cases.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Review details
Comments suppressed due to low confidence (6)
.github/workflows/ci.yml:94
- If axe-core fails, this step will be skipped and you won’t get any measurement output. Add
if: always()so the measurement is retrieved even when earlier steps fail.
- name: Get measurement
uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0
with:
task: get-measurement
label: 'axe-core'
.github/workflows/ci.yml:101
- This step may run on
pushwhere there is no PR context, causing noisy failures (even ifcontinue-on-errorhides them). Gate PR commenting to PR events and run the step withif: always()so you still get results even when earlier steps fail.
- name: Show Energy Results
uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0
with:
task: display-results
pr-comment: true
.github/workflows/ci.yml:137
- If Lighthouse fails, this step will be skipped and you won’t get any measurement output. Add
if: always()so the measurement is retrieved even when earlier steps fail.
- name: Get measurement
uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0
with:
task: get-measurement
label: 'lighthouse'
.github/workflows/ci.yml:144
- This step may run on
pushwhere there is no PR context, causing noisy failures (even ifcontinue-on-errorhides them). Gate PR commenting to PR events and run the step withif: always()so you still get results even when earlier steps fail.
- name: Show Energy Results
uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0
with:
task: display-results
pr-comment: true
.github/workflows/ci.yml:45
- If the build fails before this point, this step will be skipped and you won’t get any measurement output. Add
if: always()so the measurement is retrieved even on failed builds.
This issue also appears in the following locations of the same file:
- line 90
- line 133
- name: Get measurement
uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0
with:
task: get-measurement
label: 'build'
.github/workflows/ci.yml:51
- This step may run on
pushwhere there is no PR context, causing noisy failures (even ifcontinue-on-errorhides them). Gate PR commenting to PR events and run the step withif: always()so you still get results even when earlier steps fail.
This issue also appears in the following locations of the same file:
- line 97
- line 140
- name: Show Energy Results
uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0
with:
task: display-results
pr-comment: true
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Low
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
Eco CI Output - Old Energy EstimationEco CI Output [RUN-ID: 30561351138]:
🌳 CO2 Data: Total cost of whole PR so far: |
|||||||||||||||||||||||||||||||||||
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
Eco CI Output [RUN-ID: 30564133458]:
🌳 CO2 Data: Total cost of whole PR so far: |
|||||||||||||||||||||||||||||||||||
|
Eco CI Output [RUN-ID: 30564133458]:
🌳 CO2 Data: Total cost of whole PR so far: |
|||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
🟡 Not ready to approve
The workflow-level pull-requests: write permission combined with third-party actions needs tighter scoping (and PR-comment steps should be gated) to reduce security and operational risk.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Review details
Comments suppressed due to low confidence (4)
.github/workflows/ci.yml:11
pull-requests: writeis granted at the workflow level, which means every job/step (including third-party actions likegreen-coding-solutions/eco-ci-energy-estimation) runs with PR write access. For least-privilege, scope PR write permissions only to the jobs/steps that actually need to post PR comments (or move PR commenting into a dedicated PR-only job/workflow) and keep other jobs atcontents: readonly.
permissions:
contents: read
pull-requests: write
.github/workflows/ci.yml:102
- This step is configured to post a PR comment (
pr-comment: true), but the workflow also runs onpushtomainwhere no PR exists. Even withcontinue-on-error, this adds avoidable API calls/noise; gate the PR comment behavior to pull_request runs.
- name: Show Energy Results
uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0
with:
task: display-results
pr-comment: true
.github/workflows/ci.yml:145
- This step is configured to post a PR comment (
pr-comment: true), but the workflow also runs onpushtomainwhere no PR exists. Even withcontinue-on-error, this adds avoidable API calls/noise; gate the PR comment behavior to pull_request runs.
- name: Show Energy Results
uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0
with:
task: display-results
pr-comment: true
.github/workflows/ci.yml:52
- This step is configured to post a PR comment (
pr-comment: true), but the workflow also runs onpushtomainwhere no PR exists. Even withcontinue-on-error, this adds avoidable API calls/noise; gate the PR comment behavior to pull_request runs.
This issue also appears in the following locations of the same file:
- line 98
- line 141
- name: Show Energy Results
uses: green-coding-solutions/eco-ci-energy-estimation@782dd4a31bc426a6ae26a7b08d89af454b10ffc0
with:
task: display-results
pr-comment: true
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Low
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
|
Eco CI Output [RUN-ID: 30564133458]:
🌳 CO2 Data: Total cost of whole PR so far: |
|||||||||||||||||||||||||||||||||||
Add Eco CI to pipelines