ci(dsh-weknora): cache pinned dsh install to speed up e2e
The e2e job spends ~15 minutes downloading @deepseek-ai/dsh on every run while the actual harness scenarios finish in seconds. Cache the install directory keyed by DSH_PINNED_SPEC and enable npm dependency caching.main
parent
5b14020621
commit
4e25684b8f
|
|
@ -65,6 +65,8 @@ jobs:
|
|||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "24"
|
||||
cache: npm
|
||||
cache-dependency-path: packages/dsh-weknora/package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci || npm install
|
||||
|
|
@ -111,7 +113,7 @@ jobs:
|
|||
e2e:
|
||||
name: End-to-end inside dsh (pinned)
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 25
|
||||
timeout-minutes: 10
|
||||
defaults:
|
||||
run:
|
||||
working-directory: packages/dsh-weknora
|
||||
|
|
@ -121,11 +123,21 @@ jobs:
|
|||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "24"
|
||||
cache: npm
|
||||
cache-dependency-path: packages/dsh-weknora/package-lock.json
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: ${{ env.PNPM_VERSION }}
|
||||
|
||||
# The e2e script installs @deepseek-ai/dsh on first run (~15 min uncached).
|
||||
# Reuse the install across workflow runs; bump DSH_PINNED_SPEC to refresh.
|
||||
- name: Cache pinned dsh install
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .cache/dsh-e2e-install
|
||||
key: dsh-e2e-${{ env.DSH_PINNED_SPEC }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci || npm install
|
||||
|
||||
|
|
@ -135,6 +147,7 @@ jobs:
|
|||
- name: Run the plugin inside a real dsh profile
|
||||
env:
|
||||
DSH_PACKAGE_SPEC: ${{ env.DSH_PINNED_SPEC }}
|
||||
DSH_INSTALL_DIR: ${{ github.workspace }}/.cache/dsh-e2e-install
|
||||
DSH_E2E_LOG: ${{ runner.temp }}/dsh-weknora-e2e.log
|
||||
run: node test/e2e/run-in-dsh.mjs
|
||||
|
||||
|
|
@ -161,11 +174,24 @@ jobs:
|
|||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "24"
|
||||
cache: npm
|
||||
cache-dependency-path: packages/dsh-weknora/package-lock.json
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: ${{ env.PNPM_VERSION }}
|
||||
|
||||
- name: Week id for dsh@latest cache
|
||||
id: week
|
||||
run: echo "id=$(date -u +%G-W%V)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
# dsh@latest moves; refresh the cache weekly.
|
||||
- name: Cache latest dsh install
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .cache/dsh-e2e-install-latest
|
||||
key: dsh-e2e-latest-${{ steps.week.outputs.id }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci || npm install
|
||||
|
||||
|
|
@ -175,6 +201,7 @@ jobs:
|
|||
- name: Run against the latest harness release
|
||||
env:
|
||||
DSH_PACKAGE_SPEC: "@deepseek-ai/dsh@latest"
|
||||
DSH_INSTALL_DIR: ${{ github.workspace }}/.cache/dsh-e2e-install-latest
|
||||
run: node test/e2e/run-in-dsh.mjs
|
||||
|
||||
publish:
|
||||
|
|
@ -199,6 +226,8 @@ jobs:
|
|||
with:
|
||||
node-version: "24"
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
cache: npm
|
||||
cache-dependency-path: packages/dsh-weknora/package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci || npm install
|
||||
|
|
|
|||
Loading…
Reference in New Issue