Skip to content

ci: use read-only npm caches for validation - #270

Open
philip-gai wants to merge 1 commit into
actions:mainfrom
philip-gai:philip-gai/read-only-npm-cache
Open

philip-gai wants to merge 1 commit into
actions:mainfrom
philip-gai:philip-gai/read-only-npm-cache

Conversation

@philip-gai

@philip-gai philip-gai commented Aug 18, 2026

Copy link
Copy Markdown
Member

Summary

  • Set job-level cache-mode: read on the lint job.
  • Set job-level cache-mode: read on the licensed job.
  • Keep these validation-only jobs as npm cache consumers while other CI jobs retain the default read/write mode and can populate the same npm cache.

Validation

  • npm exec --no -- prettier --check .github/workflows/linter.yml .github/workflows/licensed.yml
  • Parsed both changed workflows with the repository's js-yaml dependency.
  • npm test -- --reporter=dot (4 files, 36 tests passed)

@philip-gai
philip-gai marked this pull request as ready for review August 18, 2026 14:53
@philip-gai
philip-gai requested a review from a team as a code owner August 18, 2026 14:53
Copilot AI lite review requested due to automatic review settings August 18, 2026 14:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR hardens CI cache behavior by making validation-only workflows (linting and license checks) consume existing npm caches without being able to write/update them, reducing cache-poisoning risk while keeping cache speedups.

Changes:

  • Set cache-mode: read on the lint job in .github/workflows/linter.yml.
  • Set cache-mode: read on the licensed job in .github/workflows/licensed.yml.
Show a summary per file
File Description
.github/workflows/linter.yml Makes the lint job restore npm caches without saving/updating them.
.github/workflows/licensed.yml Makes the license-check job restore npm caches without saving/updating them.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

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.

2 participants