Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
version: [latest, alpha]
force-install: [false, true]
runs-on: ${{ matrix.os }}
env:
SETUP_VP_FORCE_INSTALL: ${{ matrix.force-install }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6

Expand All @@ -37,10 +34,7 @@ jobs:
matrix:
node-version: ["22", "24"]
version: [latest, alpha]
force-install: [false, true]
runs-on: ubuntu-latest
env:
SETUP_VP_FORCE_INSTALL: ${{ matrix.force-install }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6

Expand All @@ -67,10 +61,7 @@ jobs:
fail-fast: false
matrix:
version: [latest, alpha]
force-install: [false, true]
runs-on: ubuntu-latest
env:
SETUP_VP_FORCE_INSTALL: ${{ matrix.force-install }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6

Expand Down Expand Up @@ -101,10 +92,7 @@ jobs:
fail-fast: false
matrix:
version: [latest, alpha]
force-install: [false, true]
runs-on: ubuntu-latest
env:
SETUP_VP_FORCE_INSTALL: ${{ matrix.force-install }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6

Expand Down Expand Up @@ -135,10 +123,7 @@ jobs:
fail-fast: false
matrix:
version: [latest, alpha]
force-install: [false, true]
runs-on: ubuntu-latest
env:
SETUP_VP_FORCE_INSTALL: ${{ matrix.force-install }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6

Expand Down Expand Up @@ -170,10 +155,7 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
version: [latest, alpha]
force-install: [false, true]
runs-on: ${{ matrix.os }}
env:
SETUP_VP_FORCE_INSTALL: ${{ matrix.force-install }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6

Expand All @@ -193,10 +175,7 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
version: [latest, alpha]
force-install: [false, true]
runs-on: ${{ matrix.os }}
env:
SETUP_VP_FORCE_INSTALL: ${{ matrix.force-install }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6

Expand Down Expand Up @@ -228,10 +207,7 @@ jobs:
fail-fast: false
matrix:
version: [latest, alpha]
force-install: [false, true]
runs-on: ubuntu-latest
env:
SETUP_VP_FORCE_INSTALL: ${{ matrix.force-install }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6

Expand Down
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ GitHub Action to set up [Vite+](https://viteplus.dev) (`vp`) with dependency cac
## Features

- Install Vite+ globally via official install scripts
- **Cache the Vite+ installation** to skip re-downloading on subsequent runs
- Optionally set up a specific Node.js version via `vp env use`
- Cache project dependencies with auto-detection of lock files
- Optionally run `vp install` after setup
Expand Down Expand Up @@ -138,15 +137,6 @@ jobs:

## Caching

### Vite+ Installation Cache

The Vite+ CLI installation (`~/.vite-plus/`) is cached automatically on a best-effort basis — no configuration needed. If a cache key can be constructed for the resolved version, it will be saved and reused on subsequent runs. On cache hit, the install script is skipped entirely, saving 10–60s depending on network conditions.

The cache key includes OS, architecture, Vite+ version, and Node.js version:
`setup-vp-{OS}-{arch}-{vp-version}-node{node-version}`

When the `version` input is a dist-tag (e.g. `latest`, `alpha`), it is resolved to a precise semver version via the npm registry before constructing the cache key. If version resolution fails (for example, due to npm registry/network issues or an unresolvable version/tag), no cache key is saved and the Vite+ installation will not be cached for that run.

### Dependency Cache

When `cache: true` is set, the action additionally caches project dependencies by auto-detecting your lock file:
Expand Down
70 changes: 35 additions & 35 deletions dist/index.mjs

Large diffs are not rendered by default.

207 changes: 0 additions & 207 deletions src/cache-vp.test.ts

This file was deleted.

Loading