























@@ -244,17 +244,6 @@ jobs:
244244 runNode
245245 ? [
246246 { check_name: "checks-node-channels", runtime: "node", task: "channels" },
247- ...(isPush
248- ? [
249- {
250- check_name: "checks-node-compat-node22",
251- runtime: "node",
252- task: "compat-node22",
253- node_version: "22.18.0",
254- cache_key_suffix: "node22",
255- },
256- ]
257- : []),
258247 ]
259248 : [],
260249 ),
@@ -914,12 +903,7 @@ jobs:
914903fail-fast: false
915904matrix: ${{ fromJson(needs.preflight.outputs.checks_matrix) }}
916905steps:
917- - name: Skip compatibility lanes on pull requests
918-if: github.event_name == 'pull_request' && matrix.task == 'compat-node22'
919-run: echo "Skipping push-only lane on pull requests."
920-921906 - name: Checkout
922-if: github.event_name != 'pull_request' || matrix.task != 'compat-node22'
923907shell: bash
924908env:
925909CHECKOUT_REPO: ${{ github.repository }}
@@ -968,15 +952,14 @@ jobs:
968952 exit 1
969953970954 - name: Setup Node environment
971-if: github.event_name != 'pull_request' || matrix.task != 'compat-node22'
972955uses: ./.github/actions/setup-node-env
973956with:
974957node-version: "${{ matrix.node_version || '24.x' }}"
975958cache-key-suffix: "${{ matrix.cache_key_suffix || 'node24' }}"
976959install-bun: "false"
977960978961 - name: Configure Node test resources
979-if: (github.event_name != 'pull_request' || matrix.task != 'compat-node22') && matrix.runtime == 'node' && (matrix.task == 'test' || matrix.task == 'channels' || matrix.task == 'compat-node22')
962+if: matrix.runtime == 'node' && (matrix.task == 'test' || matrix.task == 'channels')
980963env:
981964TASK: ${{ matrix.task }}
982965run: |
@@ -1004,7 +987,6 @@ jobs:
1004987path: src/canvas-host/a2ui/
10059881006989 - name: Run ${{ matrix.task }} (${{ matrix.runtime }})
1007-if: github.event_name != 'pull_request' || matrix.task != 'compat-node22'
1008990env:
1009991TASK: ${{ matrix.task }}
1010992NODE_OPTIONS: --max-old-space-size=6144
@@ -1018,19 +1000,89 @@ jobs:
10181000 channels)
10191001 pnpm test:channels
10201002 ;;
1021- compat-node22)
1022- pnpm build
1023- pnpm ui:build
1024- node openclaw.mjs --help
1025- node openclaw.mjs status --json --timeout 1
1026- pnpm test:build:singleton
1027- ;;
10281003 *)
10291004 echo "Unsupported checks task: $TASK" >&2
10301005 exit 1
10311006 ;;
10321007 esac
103310081009+ checks-node-compat:
1010+permissions:
1011+contents: read
1012+name: checks-node-compat-node22
1013+needs: [preflight]
1014+if: needs.preflight.outputs.run_node == 'true' && github.event_name == 'push'
1015+runs-on: ${{ github.repository == 'openclaw/openclaw' && 'blacksmith-16vcpu-ubuntu-2404' || 'ubuntu-24.04' }}
1016+timeout-minutes: 60
1017+steps:
1018+ - name: Checkout
1019+shell: bash
1020+env:
1021+CHECKOUT_REPO: ${{ github.repository }}
1022+CHECKOUT_SHA: ${{ github.sha }}
1023+CHECKOUT_TOKEN: ${{ github.token }}
1024+run: |
1025+ set -euo pipefail
1026+1027+ workdir="$GITHUB_WORKSPACE"
1028+ auth_header="$(printf 'x-access-token:%s' "$CHECKOUT_TOKEN" | base64 | tr -d '\n')"
1029+1030+ reset_checkout_dir() {
1031+ mkdir -p "$workdir"
1032+ find "$workdir" -mindepth 1 -maxdepth 1 -exec rm -rf {} +
1033+ }
1034+1035+ checkout_attempt() {
1036+ local attempt="$1"
1037+1038+ reset_checkout_dir
1039+ git init "$workdir" >/dev/null
1040+ git config --global --add safe.directory "$workdir"
1041+ git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}"
1042+ git -C "$workdir" config gc.auto 0
1043+1044+ timeout --signal=TERM 30s git -C "$workdir" \
1045+ -c protocol.version=2 \
1046+ -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth_header}" \
1047+ fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \
1048+ "+${CHECKOUT_SHA}:refs/remotes/origin/ci-target" || return 1
1049+1050+ git -C "$workdir" checkout --force --detach "$CHECKOUT_SHA" || return 1
1051+ test -f "$workdir/.github/actions/setup-node-env/action.yml" || return 1
1052+ echo "checkout attempt ${attempt}/2 succeeded"
1053+ }
1054+1055+ for attempt in 1 2; do
1056+ if checkout_attempt "$attempt"; then
1057+ exit 0
1058+ fi
1059+ echo "checkout attempt ${attempt}/2 failed"
1060+ sleep $((attempt * 5))
1061+ done
1062+1063+ echo "checkout failed after 2 attempts" >&2
1064+ exit 1
1065+1066+ - name: Setup Node environment
1067+uses: ./.github/actions/setup-node-env
1068+with:
1069+node-version: "22.18.0"
1070+cache-key-suffix: "node22"
1071+install-bun: "false"
1072+1073+ - name: Configure Node test resources
1074+run: echo "OPENCLAW_VITEST_MAX_WORKERS=2" >> "$GITHUB_ENV"
1075+1076+ - name: Run Node 22 compatibility
1077+env:
1078+NODE_OPTIONS: --max-old-space-size=6144
1079+run: |
1080+ pnpm build
1081+ pnpm ui:build
1082+ node openclaw.mjs --help
1083+ node openclaw.mjs status --json --timeout 1
1084+ pnpm test:build:singleton
1085+10341086 checks-node-core-test-nondist-shard:
10351087permissions:
10361088contents: read
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。