forked from openclaw/openclaw
-
Notifications
You must be signed in to change notification settings - Fork 3
66 lines (58 loc) 路 2.26 KB
/
Copy pathvitest-cache-warm.yml
File metadata and controls
66 lines (58 loc) 路 2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Vitest Cache Warm
on:
workflow_dispatch:
repository_dispatch:
types: [vitest-cache-warm]
schedule:
- cron: "17 8 * * *"
permissions:
contents: read
concurrency:
group: vitest-cache-warm
cancel-in-progress: false
jobs:
warm:
# Dependency snapshots are serialized before main CI fanout. This workflow
# writes only the transform and compile caches from scheduled/trusted runs.
if: github.repository == 'openclaw/openclaw'
runs-on: ${{ vars.OPENCLAW_CI_RUNNER_BACKEND == 'github' && 'ubuntu-24.04' || 'blacksmith-8vcpu-ubuntu-2404' }}
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Setup Node environment
uses: ./.github/actions/setup-node-env
with:
install-bun: "false"
node-compile-cache: "true"
node-compile-cache-scope: "test"
save-actions-cache: "true"
save-node-compile-cache: "true"
save-vitest-fs-cache: "true"
use-actions-cache: "true"
vitest-fs-cache: "true"
- name: Select broad cache seed
shell: bash
run: |
set -euo pipefail
node --import tsx --input-type=module <<'EOF'
import { appendFileSync } from "node:fs";
import { createVitestCacheWarmGroups } from "./scripts/lib/ci-node-test-plan.mts";
// Warm the selected planner envelopes for the striped unit-fast graph
// plus import-bound graphs that remained cold in protected-cache readers.
const groups = createVitestCacheWarmGroups();
appendFileSync(
process.env.GITHUB_ENV,
[
`OPENCLAW_NODE_TEST_GROUPS_JSON=${JSON.stringify(groups)}`,
"OPENCLAW_NODE_TEST_PLAN_CONCURRENCY=1",
].join("\n") + "\n",
);
EOF
- name: Warm transform and compile caches
env:
# Match the CI shard lanes running the same envelopes: without the
# raised ceiling a heavy suite's worker can die under default heap
# (run 31874567859), skipping every cache save for the day.
NODE_OPTIONS: --max-old-space-size=8192
run: node --import tsx scripts/ci-run-node-test-shard.mts