astral-sh/ruff GitHub Actions scorecard

Public GitHub Actions data, last 30 days. Updated .

Data sourced from public GitHub. GitSpider is not affiliated with or endorsed by this repository's owners. Request removal.

49 min/mo
recoverable (~2% of CI time) · across 18 patterns
Estimated from wall-clock time · public repos pay $0, $ = private-repo equivalent
See all 18 fixes, each with the exact YAML ↓
0.8%
failure rate, 30d
1m
avg time to recover from a failure
Since : findings 18 → 18 · recoverable ~40 → ~49 min/mo
46 workflows · 2,500 runs (83.3/day) · 2,625 CI-min (wall-clock) · ≈$16 at private-repo rates (30d)
CI minutes, cost and failure rate are from the latest 500 of 2,500 runs.

Where the minutes go (30d)

CI~1,330 min · 101 runs
ty ecosystem-analyzer~459 min · 80 runs
Run memory report~373 min · 80 runs
or track on every push →

Waste detected

Biggest wins first, each with the exact config fix.

Missing dependency cache · [ty Playground] Release

~40 min/mo

Set `cache: 'npm'` on your `actions/setup-node` step, or add an `actions/cache@v4` step keyed on your lockfile.

- uses: actions/setup-node@v4
  with:
    node-version: 20
    cache: 'npm'

Full guide: how to fix this →

No concurrency control · Release

~8 min/mo

Add a `concurrency:` block keyed on branch to cancel superseded runs when devs push twice quickly.

concurrency:
  group: ${{ github.workflow }}
  # no cancel-in-progress on deploys: queued deploys would be dropped

Full guide: how to fix this →

No concurrency control · Label pull requests and prefix ty titles

~1 min/mo

Add a `concurrency:` block keyed on branch to cancel superseded runs when devs push twice quickly.

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

Full guide: how to fix this →

Also found: 15 more config fixes with negligible recoverable minutes: timeouts, retention, path filters

No path filters on triggers · CI

~0 min/mo

Runs on every push/PR with no `paths:` filter, so docs-only changes still trigger full CI. Add a `paths:` filter if that's common.

on:
  pull_request:
    paths:
      - 'src/**'
      - 'package.json'

Full guide: how to fix this →

Premium runners (macOS / Windows) · CI

~0 min/mo

macOS bills ~10x and Windows ~2x a Linux minute. The cost estimate above assumes Linux, so your real spend is higher. Move any job that doesn't need them to `ubuntu-latest`.

jobs:
  build:
    runs-on: ubuntu-latest  # ~10x cheaper than macos-latest

Full guide: how to fix this →

Cache without restore-keys · CI

~0 min/mo

The cache restores only on an exact key match, so any lockfile change means a full cold download. Add a `restore-keys:` prefix line for partial restores.

    key: deps-${{ runner.os }}-${{ hashFiles('**/<lockfile>') }}
    restore-keys: |
      deps-${{ runner.os }}-

Full guide: how to fix this →

Third-party actions pinned to a mutable ref · CI

~0 min/mo

3 third-party actions pinned to a branch or other mutable ref, which can change under you (supply-chain risk, non-reproducible builds). Pin to a full commit SHA instead.

uses: astral-sh/ruff/.github/workflows/publish-pull-request-report.yml@<full-sha>  # was @main

Artifacts at default retention · Run memory report

~0 min/mo

`upload-artifact` has no `retention-days`, so artifacts keep up to 90 days (storage cost). Set e.g. `retention-days: 7`.

- uses: actions/upload-artifact@v4
  with:
    name: build
    path: dist/
    retention-days: 7

Full guide: how to fix this →

Third-party actions pinned to a mutable ref · Run memory report

~0 min/mo

1 third-party action pinned to a branch or other mutable ref, which can change under you (supply-chain risk, non-reproducible builds). Pin to a full commit SHA instead.

uses: astral-sh/ruff/.github/workflows/publish-pull-request-report.yml@<full-sha>  # was @main

No job timeout · [ty Playground] Release

~0 min/mo

No job sets `timeout-minutes`, so a hung step can run to GitHub's 6-hour default. Add `timeout-minutes` to each job.

jobs:
  build:
    runs-on: ubuntu-latest
    timeout-minutes: 15

Full guide: how to fix this →

No job timeout · Release

~0 min/mo

No job sets `timeout-minutes`, so a hung step can run to GitHub's 6-hour default. Add `timeout-minutes` to each job.

jobs:
  build:
    runs-on: ubuntu-latest
    timeout-minutes: 15

Full guide: how to fix this →

Artifacts at default retention · Release

~0 min/mo

`upload-artifact` has no `retention-days`, so artifacts keep up to 90 days (storage cost). Set e.g. `retention-days: 7`.

- uses: actions/upload-artifact@v4
  with:
    name: build
    path: dist/
    retention-days: 7

Full guide: how to fix this →

No path filters on triggers · Release

~0 min/mo

Runs on every push/PR with no `paths:` filter, so docs-only changes still trigger full CI. Add a `paths:` filter if that's common.

on:
  pull_request:
    paths:
      - 'src/**'
      - 'package.json'

Full guide: how to fix this →

No job timeout · Sync ruff-security

~0 min/mo

No job sets `timeout-minutes`, so a hung step can run to GitHub's 6-hour default. Add `timeout-minutes` to each job.

jobs:
  build:
    runs-on: ubuntu-latest
    timeout-minutes: 15

Full guide: how to fix this →

Artifacts at default retention · ty ecosystem-analyzer

~0 min/mo

`upload-artifact` has no `retention-days`, so artifacts keep up to 90 days (storage cost). Set e.g. `retention-days: 7`.

- uses: actions/upload-artifact@v4
  with:
    name: build
    path: dist/
    retention-days: 7

Full guide: how to fix this →

Third-party actions pinned to a mutable ref · ty ecosystem-analyzer

~0 min/mo

1 third-party action pinned to a branch or other mutable ref, which can change under you (supply-chain risk, non-reproducible builds). Pin to a full commit SHA instead.

uses: astral-sh/ruff/.github/workflows/publish-pull-request-report.yml@<full-sha>  # was @main

Artifacts at default retention · Run typing conformance

~0 min/mo

`upload-artifact` has no `retention-days`, so artifacts keep up to 90 days (storage cost). Set e.g. `retention-days: 7`.

- uses: actions/upload-artifact@v4
  with:
    name: build
    path: dist/
    retention-days: 7

Full guide: how to fix this →

Third-party actions pinned to a mutable ref · Run typing conformance

~0 min/mo

1 third-party action pinned to a branch or other mutable ref, which can change under you (supply-chain risk, non-reproducible builds). Pin to a full commit SHA instead.

uses: astral-sh/ruff/.github/workflows/publish-pull-request-report.yml@<full-sha>  # was @main
Copy every fix as one block (9 snippets, annotated per workflow)
# Missing dependency cache (npm) (applies to: [ty Playground] Release)
- uses: actions/setup-node@v4
  with:
    node-version: 20
    cache: 'npm'

# No concurrency control (applies to: Release)
concurrency:
  group: ${{ github.workflow }}
  # no cancel-in-progress on deploys: queued deploys would be dropped

# No concurrency control (applies to: Label pull requests and prefix ty titles)
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

# No path filters on triggers (applies to: CI, Release)
on:
  pull_request:
    paths:
      - 'src/**'
      - 'package.json'

# Premium runners (macOS / Windows) (applies to: CI)
jobs:
  build:
    runs-on: ubuntu-latest  # ~10x cheaper than macos-latest

# Cache without restore-keys (applies to: CI)
    key: deps-${{ runner.os }}-${{ hashFiles('**/<lockfile>') }}
    restore-keys: |
      deps-${{ runner.os }}-

# Third-party actions pinned to a mutable ref (applies to: CI, Run memory report, ty ecosystem-analyzer, Run typing conformance)
uses: astral-sh/ruff/.github/workflows/publish-pull-request-report.yml@<full-sha>  # was @main

# Artifacts at default retention (applies to: Run memory report, Release, ty ecosystem-analyzer, Run typing conformance)
- uses: actions/upload-artifact@v4
  with:
    name: build
    path: dist/
    retention-days: 7

# No job timeout (applies to: [ty Playground] Release, Release, Sync ruff-security)
jobs:
  build:
    runs-on: ubuntu-latest
    timeout-minutes: 15

Each snippet is representative. Merge into the named workflow files rather than pasting wholesale.

Add the badge to your README

Live CI-health badge → GitSpider badge

[![GitSpider](https://gitspider.com/badge/astral-sh/ruff.svg)](https://gitspider.com/scan/astral-sh/ruff)

Want this on every push?

This scorecard is a one-time snapshot. Install the free GitHub App to track this repo continuously: new regressions caught as they land, trends over time, on your public and private repos. Team adds the offending commit on the PR + Slack alerts.

Install & monitor this repo →

💬 On Team, every PR gets an automatic comment when its CI run fails or runs slow, right where your team already looks. See plans →

Not ready to install? Get this report by email. No spam, unsubscribe anytime.

Share this scorecard: https://gitspider.com/scan/astral-sh/ruff