Oversized runner for job complexity¶
Rule ID |
|
|---|---|
Category |
energy |
Severity |
medium |
Job uses a large runner (8+ vCPUs) but contains only lightweight steps like linting or unit tests. Downsize to a standard runner to reduce cost and carbon footprint.
Detection¶
pattern_matching — Regex or keyword matching on string field values.
Examples¶
Non-compliant:
jobs:
test:
runs-on: ubuntu-latest-8-cores
steps:
- uses: actions/checkout@v4
- run: npm test
Compliant:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm test
Fix: Downsize the runner to ubuntu-latest or a 2-core equivalent. Reserve large runners for compilation, model training, or other parallelizable compute tasks.