






















@@ -455,7 +455,9 @@ jobs:
455455runs-on: ${{ github.repository == 'openclaw/openclaw' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-24.04' }}
456456timeout-minutes: 20
457457outputs:
458-gateway-watch-result: ${{ steps.gateway_watch.outcome }}
458+channels-result: ${{ steps.built_artifact_checks.outputs['channels-result'] }}
459+core-support-boundary-result: ${{ steps.built_artifact_checks.outputs['core-support-boundary-result'] }}
460+gateway-watch-result: ${{ steps.built_artifact_checks.outputs['gateway-watch-result'] }}
459461steps:
460462 - name: Checkout
461463shell: bash
@@ -568,11 +570,75 @@ jobs:
568570 - name: Check CLI startup memory
569571run: pnpm test:startup:memory
570572571- - name: Run gateway watch regression
572-id: gateway_watch
573-if: needs.preflight.outputs.run_check_additional == 'true'
574-continue-on-error: true
575-run: node scripts/check-gateway-watch-regression.mjs --skip-build
573+ - name: Run built artifact checks
574+id: built_artifact_checks
575+if: needs.preflight.outputs.run_checks == 'true' || needs.preflight.outputs.run_checks_node_core_dist == 'true' || needs.preflight.outputs.run_check_additional == 'true'
576+env:
577+RUN_CHANNELS: ${{ needs.preflight.outputs.run_checks }}
578+RUN_CORE_SUPPORT_BOUNDARY: ${{ needs.preflight.outputs.run_checks_node_core_dist }}
579+RUN_GATEWAY_WATCH: ${{ needs.preflight.outputs.run_check_additional }}
580+shell: bash
581+run: |
582+ set -uo pipefail
583+584+ names=()
585+ pids=()
586+ logs=()
587+ declare -A results=(
588+ ["channels"]="skipped"
589+ ["core-support-boundary"]="skipped"
590+ ["gateway-watch"]="skipped"
591+ )
592+593+ start_check() {
594+ local name="$1"
595+ shift
596+ local log="${RUNNER_TEMP}/${name}.log"
597+ names+=("$name")
598+ logs+=("$log")
599+ echo "starting ${name}: $*"
600+ "$@" >"$log" 2>&1 &
601+ pids+=("$!")
602+ }
603+604+ if [ "$RUN_CHANNELS" = "true" ]; then
605+ start_check "channels" env \
606+ NODE_OPTIONS=--max-old-space-size=6144 \
607+ OPENCLAW_VITEST_MAX_WORKERS=1 \
608+ pnpm test:channels
609+ fi
610+611+ if [ "$RUN_CORE_SUPPORT_BOUNDARY" = "true" ]; then
612+ start_check "core-support-boundary" env \
613+ NODE_OPTIONS=--max-old-space-size=6144 \
614+ OPENCLAW_VITEST_MAX_WORKERS=2 \
615+ node scripts/run-vitest.mjs run --config test/vitest/vitest.full-core-support-boundary.config.ts
616+ fi
617+618+ if [ "$RUN_GATEWAY_WATCH" = "true" ]; then
619+ start_check "gateway-watch" node scripts/check-gateway-watch-regression.mjs --skip-build
620+ fi
621+622+ for index in "${!pids[@]}"; do
623+ name="${names[$index]}"
624+ log="${logs[$index]}"
625+ pid="${pids[$index]}"
626+627+ if wait "$pid"; then
628+ result="success"
629+ else
630+ result="failure"
631+ fi
632+633+ echo "::group::${name} log"
634+ cat "$log"
635+ echo "::endgroup::"
636+ results["$name"]="$result"
637+ done
638+639+ for name in channels core-support-boundary gateway-watch; do
640+ echo "${name}-result=${results[$name]}" >> "$GITHUB_OUTPUT"
641+ done
576642577643 - name: Upload gateway watch regression artifacts
578644if: always() && needs.preflight.outputs.run_check_additional == 'true'
@@ -936,117 +1002,25 @@ jobs:
9361002name: ${{ matrix.check_name }}
9371003needs: [preflight, build-artifacts]
9381004if: ${{ !cancelled() && always() && needs.preflight.outputs.run_checks == 'true' && needs.build-artifacts.result == 'success' }}
939-runs-on: ${{ github.repository == 'openclaw/openclaw' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-24.04' }}
940-timeout-minutes: 60
1005+runs-on: ubuntu-24.04
1006+timeout-minutes: 5
9411007strategy:
9421008fail-fast: false
9431009matrix: ${{ fromJson(needs.preflight.outputs.checks_matrix) }}
9441010steps:
945- - name: Checkout
946-shell: bash
947-env:
948-CHECKOUT_REPO: ${{ github.repository }}
949-CHECKOUT_SHA: ${{ github.sha }}
950-CHECKOUT_TOKEN: ${{ github.token }}
951-run: |
952- set -euo pipefail
953-954- workdir="$GITHUB_WORKSPACE"
955- auth_header="$(printf 'x-access-token:%s' "$CHECKOUT_TOKEN" | base64 | tr -d '\n')"
956-957- reset_checkout_dir() {
958- mkdir -p "$workdir"
959- find "$workdir" -mindepth 1 -maxdepth 1 -exec rm -rf {} +
960- }
961-962- checkout_attempt() {
963- local attempt="$1"
964-965- reset_checkout_dir
966- git init "$workdir" >/dev/null
967- git config --global --add safe.directory "$workdir"
968- git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}"
969- git -C "$workdir" config gc.auto 0
970-971- timeout --signal=TERM 30s git -C "$workdir" \
972- -c protocol.version=2 \
973- -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth_header}" \
974- fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \
975- "+${CHECKOUT_SHA}:refs/remotes/origin/ci-target" || return 1
976-977- git -C "$workdir" checkout --force --detach "$CHECKOUT_SHA" || return 1
978- test -f "$workdir/.github/actions/setup-node-env/action.yml" || return 1
979- echo "checkout attempt ${attempt}/2 succeeded"
980- }
981-982- for attempt in 1 2; do
983- if checkout_attempt "$attempt"; then
984- exit 0
985- fi
986- echo "checkout attempt ${attempt}/2 failed"
987- sleep $((attempt * 5))
988- done
989-990- echo "checkout failed after 2 attempts" >&2
991- exit 1
992-993- - name: Setup Node environment
994-uses: ./.github/actions/setup-node-env
995-with:
996-node-version: "${{ matrix.node_version || '24.x' }}"
997-cache-key-suffix: "${{ matrix.cache_key_suffix || 'node24' }}"
998-install-bun: "false"
999-1000- - name: Configure Node test resources
1001-if: matrix.runtime == 'node' && (matrix.task == 'test' || matrix.task == 'channels')
1011+ - name: Verify ${{ matrix.task }} (${{ matrix.runtime }})
10021012env:
10031013TASK: ${{ matrix.task }}
1004-run: |
1005- echo "OPENCLAW_VITEST_MAX_WORKERS=2" >> "$GITHUB_ENV"
1006- if [ "$TASK" = "test" ]; then
1007- echo "OPENCLAW_TEST_PROJECTS_LEAF_SHARDS=1" >> "$GITHUB_ENV"
1008- echo "OPENCLAW_TEST_SKIP_FULL_EXTENSIONS_SHARD=1" >> "$GITHUB_ENV"
1009- fi
1010- if [ "$TASK" = "channels" ]; then
1011- echo "OPENCLAW_VITEST_MAX_WORKERS=1" >> "$GITHUB_ENV"
1012- fi
1013-1014- - name: Restore dist cache
1015-if: matrix.task == 'test'
1016-id: checks-dist-cache
1017-uses: actions/cache@v5
1018-with:
1019-path: |
1020- dist/
1021- dist-runtime/
1022- key: ${{ runner.os }}-dist-build-${{ github.sha }}
1023-1024- - name: Verify dist cache
1025-if: matrix.task == 'test' && steps.checks-dist-cache.outputs.cache-hit != 'true'
1026-run: |
1027- echo "Missing same-run dist cache for ${RUNNER_OS}-dist-build-${GITHUB_SHA}" >&2
1028- exit 1
1029-1030- - name: Download A2UI bundle artifact
1031-if: matrix.task == 'test' || matrix.task == 'channels'
1032-uses: actions/download-artifact@v8
1033-with:
1034-name: canvas-a2ui-bundle
1035-path: src/canvas-host/a2ui/
1036-1037- - name: Run ${{ matrix.task }} (${{ matrix.runtime }})
1038-env:
1039-TASK: ${{ matrix.task }}
1040-NODE_OPTIONS: --max-old-space-size=6144
1014+CHANNELS_RESULT: ${{ needs.build-artifacts.outputs['channels-result'] }}
10411015shell: bash
10421016run: |
10431017 set -euo pipefail
10441018 case "$TASK" in
1045- test)
1046- pnpm test
1047- ;;
10481019 channels)
1049- pnpm test:channels
1020+ if [ "$CHANNELS_RESULT" != "success" ]; then
1021+ echo "Channel tests failed in build-artifacts: $CHANNELS_RESULT" >&2
1022+ exit 1
1023+ fi
10501024 ;;
10511025 *)
10521026 echo "Unsupported checks task: $TASK" >&2
@@ -1261,144 +1235,31 @@ jobs:
12611235name: ${{ matrix.check_name }}
12621236needs: [preflight, build-artifacts]
12631237if: ${{ !cancelled() && always() && needs.preflight.outputs.run_checks_node_core_dist == 'true' && needs.build-artifacts.result == 'success' }}
1264-runs-on: ${{ github.repository == 'openclaw/openclaw' && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-24.04' }}
1265-timeout-minutes: 60
1238+runs-on: ubuntu-24.04
1239+timeout-minutes: 5
12661240strategy:
12671241fail-fast: false
12681242matrix: ${{ fromJson(needs.preflight.outputs.checks_node_core_dist_matrix) }}
12691243steps:
1270- - name: Checkout
1271-shell: bash
1272-env:
1273-CHECKOUT_REPO: ${{ github.repository }}
1274-CHECKOUT_SHA: ${{ github.sha }}
1275-CHECKOUT_TOKEN: ${{ github.token }}
1276-run: |
1277- set -euo pipefail
1278-1279- workdir="$GITHUB_WORKSPACE"
1280- auth_header="$(printf 'x-access-token:%s' "$CHECKOUT_TOKEN" | base64 | tr -d '\n')"
1281-1282- reset_checkout_dir() {
1283- mkdir -p "$workdir"
1284- find "$workdir" -mindepth 1 -maxdepth 1 -exec rm -rf {} +
1285- }
1286-1287- checkout_attempt() {
1288- local attempt="$1"
1289-1290- reset_checkout_dir
1291- git init "$workdir" >/dev/null
1292- git config --global --add safe.directory "$workdir"
1293- git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}"
1294- git -C "$workdir" config gc.auto 0
1295-1296- timeout --signal=TERM 30s git -C "$workdir" \
1297- -c protocol.version=2 \
1298- -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth_header}" \
1299- fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \
1300- "+${CHECKOUT_SHA}:refs/remotes/origin/ci-target" || return 1
1301-1302- git -C "$workdir" checkout --force --detach "$CHECKOUT_SHA" || return 1
1303- test -f "$workdir/.github/actions/setup-node-env/action.yml" || return 1
1304- echo "checkout attempt ${attempt}/2 succeeded"
1305- }
1306-1307- for attempt in 1 2; do
1308- if checkout_attempt "$attempt"; then
1309- exit 0
1310- fi
1311- echo "checkout attempt ${attempt}/2 failed"
1312- sleep $((attempt * 5))
1313- done
1314-1315- echo "checkout failed after 2 attempts" >&2
1316- exit 1
1317-1318- - name: Setup Node environment
1319-uses: ./.github/actions/setup-node-env
1320-with:
1321-node-version: "${{ matrix.node_version || '24.x' }}"
1322-cache-key-suffix: "${{ matrix.cache_key_suffix || 'node24' }}"
1323-install-bun: "false"
1324-1325- - name: Configure Node test resources
1326-run: echo "OPENCLAW_VITEST_MAX_WORKERS=2" >> "$GITHUB_ENV"
1327-1328- - name: Restore dist cache
1329-id: dist-cache
1330-uses: actions/cache@v5
1331-with:
1332-path: |
1333- dist/
1334- dist-runtime/
1335- key: ${{ runner.os }}-dist-build-${{ github.sha }}
1336-1337- - name: Verify dist cache
1338-if: steps.dist-cache.outputs.cache-hit != 'true'
1339-run: |
1340- echo "Missing same-run dist cache for ${RUNNER_OS}-dist-build-${GITHUB_SHA}" >&2
1341- exit 1
1342-1343- - name: Download A2UI bundle artifact
1344-uses: actions/download-artifact@v8
1345-with:
1346-name: canvas-a2ui-bundle
1347-path: src/canvas-host/a2ui/
1348-1349- - name: Run Node test shard
1244+ - name: Verify Node test shard
13501245env:
1351-NODE_OPTIONS: --max-old-space-size=6144
1352-OPENCLAW_NODE_TEST_CONFIGS_JSON: ${{ toJson(matrix.configs) }}
1353-OPENCLAW_NODE_TEST_INCLUDE_PATTERNS_JSON: ${{ toJson(matrix.includePatterns) }}
1246+CORE_SUPPORT_BOUNDARY_RESULT: ${{ needs.build-artifacts.outputs['core-support-boundary-result'] }}
1247+SHARD_NAME: ${{ matrix.shard_name }}
13541248shell: bash
13551249run: |
13561250 set -euo pipefail
1357- node --input-type=module <<'EOF'
1358- import { spawnSync } from "node:child_process";
1359- import { writeFileSync } from "node:fs";
1360- import { join } from "node:path";
1361- import { resolveVitestCliEntry, resolveVitestNodeArgs } from "./scripts/run-vitest.mjs";
1362-1363- const configs = JSON.parse(process.env.OPENCLAW_NODE_TEST_CONFIGS_JSON ?? "[]");
1364- if (!Array.isArray(configs) || configs.length === 0) {
1365- console.error("Missing node test shard configs");
1366- process.exit(1);
1367- }
1368- const includePatterns = JSON.parse(process.env.OPENCLAW_NODE_TEST_INCLUDE_PATTERNS_JSON ?? "null");
1369- const childEnv = { ...process.env };
1370- if (Array.isArray(includePatterns) && includePatterns.length > 0) {
1371- const includeFile = join(
1372- process.env.RUNNER_TEMP ?? ".",
1373- `node-test-include-${process.env.GITHUB_JOB ?? "local"}-${Date.now()}.json`,
1374- );
1375- writeFileSync(includeFile, JSON.stringify(includePatterns), "utf8");
1376- childEnv.OPENCLAW_VITEST_INCLUDE_FILE = includeFile;
1377- }
1378-1379- for (const config of configs) {
1380- console.error(`[test] starting ${config}`);
1381- const result = spawnSync(
1382- "pnpm",
1383- [
1384- "exec",
1385- "node",
1386- ...resolveVitestNodeArgs(process.env),
1387- resolveVitestCliEntry(),
1388- "run",
1389- "--config",
1390- config,
1391- ],
1392- {
1393- env: childEnv,
1394- stdio: "inherit",
1395- },
1396- );
1397- if ((result.status ?? 1) !== 0) {
1398- process.exit(result.status ?? 1);
1399- }
1400- }
1401- EOF
1251+ case "$SHARD_NAME" in
1252+ core-support-boundary)
1253+ if [ "$CORE_SUPPORT_BOUNDARY_RESULT" != "success" ]; then
1254+ echo "Core support boundary shard failed in build-artifacts: $CORE_SUPPORT_BOUNDARY_RESULT" >&2
1255+ exit 1
1256+ fi
1257+ ;;
1258+ *)
1259+ echo "Unsupported built-artifact shard: $SHARD_NAME" >&2
1260+ exit 1
1261+ ;;
1262+ esac
1402126314031264 checks-node-core-test:
14041265permissions:
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。