Skip to content

ci: cache pip packages for the ScanCode license scan#54

Merged
tbjers merged 1 commit into
mainfrom
ci/cache-scancode-pip-deps
Jul 6, 2026
Merged

ci: cache pip packages for the ScanCode license scan#54
tbjers merged 1 commit into
mainfrom
ci/cache-scancode-pip-deps

Conversation

@tbjers

@tbjers tbjers commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The ScanCode license-scan workflow (aboutcode-org/scancode-action) installs scancodeio via pip install --upgrade directly on the runner on every run, with no caching — adding several minutes per run to re-download the same wheels.
  • Adds an actions/cache step (same pin already used for the Playwright cache in ci.yml) targeting ~/.cache/pip, keyed on ${{ runner.os }}-pip-scancode-${{ github.run_id }} with a prefix restore-keys fallback. There's no lockfile to hash against since the action always installs "latest," so this run_id-in-key idiom guarantees a fresh cache save every run while still restoring the most recent prior cache as a warm starting point (never stale, never starts cold after the first run).

Test plan

  • Validated YAML syntax
  • Confirm the Cache pip packages for ScanCode step shows a cache hit/restore on the second run of this workflow (first run on this PR will be a cold miss, as expected)

🤖 Generated with Claude Code

The ScanCode action installs scancodeio via pip on every run with no
cache, adding several minutes per run just to re-download the same
wheels. Caches ~/.cache/pip using a run_id-keyed cache with a prefix
restore-key, so each run seeds from the most recent prior cache while
still saving a fresh snapshot every time.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@tbjers
tbjers merged commit 4bd0002 into main Jul 6, 2026
5 checks passed
@tbjers
tbjers deleted the ci/cache-scancode-pip-deps branch July 6, 2026 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant