Skip to content

[CI Energy Waste]: consolidate linters workflow to reduce redundancy of checkouts #58985

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

souhailaS
Copy link

Context

This workflow did run for ~135 days during the past year alone. The job runs can be optimized by reducing redundancy in steps across jobs. For instance, there exists 8 checkout operations across all the jobs.

Change details

  • Reduced from 8 jobs to 4 consolidated jobs
  • Eliminated redundant checkout operations (8 -> 4, 50% reduction)
  • Consolidated Node.js and Python setup steps
  • Maintained all original functionality and safety checks
  • Reduced GitHub Actions minutes consumption

Jobs reorganized:

  • lint-node-based: addon-docs, js, md, shell scripts
  • lint-python-based: cpp, python, yaml
  • format-cpp: kept separate (requires both runtimes)
  • lint-misc: codeowners, pr-url, readme

Additional Context

We are a team of researchers from University of Zurich (https://www.ifi.uzh.ch/en/zest.html) currently working on automating energy optimizations in GitHub Actions workflows. This optimization maintains full functionality while reducing computational overhead and energy consumption.

[email protected]

- Reduced from 8 jobs to 4 consolidated jobs
- Eliminated redundant checkout operations (8 → 4, 50% reduction)
- Consolidated Node.js and Python setup steps
- Maintained all original functionality and safety checks
- Reduced GitHub Actions minutes consumption

Jobs reorganized:
- lint-node-based: addon-docs, js, md, shell scripts
- lint-python-based: cpp, python, yaml
- format-cpp: kept separate (requires both runtimes)
- lint-misc: codeowners, pr-url, readme
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/actions

@nodejs-github-bot nodejs-github-bot added the meta Issues and PRs related to the general management of the project. label Jul 7, 2025
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't we want to fetch the additional commit only for PRs?

@aduh95
Copy link
Contributor

aduh95 commented Jul 7, 2025

This PR should probably be split into several PRs so it's easier to review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta Issues and PRs related to the general management of the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants