ci: tighten cache docs and node22 gate
This commit is contained in:
2
.github/actions/setup-node-env/action.yml
vendored
2
.github/actions/setup-node-env/action.yml
vendored
@@ -20,7 +20,7 @@ inputs:
|
|||||||
required: false
|
required: false
|
||||||
default: "true"
|
default: "true"
|
||||||
use-sticky-disk:
|
use-sticky-disk:
|
||||||
description: Use Blacksmith sticky disks for pnpm store caching.
|
description: Request Blacksmith sticky-disk pnpm caching on trusted runs; pull_request runs fall back to actions/cache.
|
||||||
required: false
|
required: false
|
||||||
default: "false"
|
default: "false"
|
||||||
install-deps:
|
install-deps:
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ inputs:
|
|||||||
required: false
|
required: false
|
||||||
default: "node24"
|
default: "node24"
|
||||||
use-sticky-disk:
|
use-sticky-disk:
|
||||||
description: Use Blacksmith sticky disks instead of actions/cache for pnpm store on trusted runs.
|
description: Use Blacksmith sticky disks instead of actions/cache for pnpm store on trusted runs; pull_request runs fall back to actions/cache.
|
||||||
required: false
|
required: false
|
||||||
default: "false"
|
default: "false"
|
||||||
use-restore-keys:
|
use-restore-keys:
|
||||||
@@ -18,7 +18,7 @@ inputs:
|
|||||||
required: false
|
required: false
|
||||||
default: "true"
|
default: "true"
|
||||||
use-actions-cache:
|
use-actions-cache:
|
||||||
description: Whether to restore/save pnpm store with actions/cache.
|
description: Whether to restore/save pnpm store with actions/cache, including pull_request fallback when sticky disks are disabled.
|
||||||
required: false
|
required: false
|
||||||
default: "true"
|
default: "true"
|
||||||
runs:
|
runs:
|
||||||
@@ -51,6 +51,7 @@ runs:
|
|||||||
run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
|
run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Mount pnpm store sticky disk
|
- name: Mount pnpm store sticky disk
|
||||||
|
# Keep persistent sticky-disk state off untrusted PR runs.
|
||||||
if: inputs.use-sticky-disk == 'true' && github.event_name != 'pull_request'
|
if: inputs.use-sticky-disk == 'true' && github.event_name != 'pull_request'
|
||||||
uses: useblacksmith/stickydisk@v1
|
uses: useblacksmith/stickydisk@v1
|
||||||
with:
|
with:
|
||||||
@@ -58,6 +59,7 @@ runs:
|
|||||||
path: ${{ steps.pnpm-store.outputs.path }}
|
path: ${{ steps.pnpm-store.outputs.path }}
|
||||||
|
|
||||||
- name: Restore pnpm store cache (exact key only)
|
- name: Restore pnpm store cache (exact key only)
|
||||||
|
# PRs that request sticky disks still need a safe cache restore path.
|
||||||
if: inputs.use-actions-cache == 'true' && (inputs.use-sticky-disk != 'true' || github.event_name == 'pull_request') && inputs.use-restore-keys != 'true'
|
if: inputs.use-actions-cache == 'true' && (inputs.use-sticky-disk != 'true' || github.event_name == 'pull_request') && inputs.use-restore-keys != 'true'
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
@@ -258,8 +258,14 @@ jobs:
|
|||||||
echo "OPENCLAW_TEST_WORKERS=2" >> "$GITHUB_ENV"
|
echo "OPENCLAW_TEST_WORKERS=2" >> "$GITHUB_ENV"
|
||||||
echo "OPENCLAW_TEST_MAX_OLD_SPACE_SIZE_MB=6144" >> "$GITHUB_ENV"
|
echo "OPENCLAW_TEST_MAX_OLD_SPACE_SIZE_MB=6144" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- name: Run Node 22 compatibility gate
|
- name: Build under Node 22
|
||||||
run: pnpm build && pnpm test
|
run: pnpm build
|
||||||
|
|
||||||
|
- name: Run tests under Node 22
|
||||||
|
run: pnpm test
|
||||||
|
|
||||||
|
- name: Verify npm pack under Node 22
|
||||||
|
run: pnpm release:check
|
||||||
|
|
||||||
skills-python:
|
skills-python:
|
||||||
needs: [docs-scope, changed-scope]
|
needs: [docs-scope, changed-scope]
|
||||||
|
|||||||
Reference in New Issue
Block a user