mirror of
https://github.com/openclaw/clawhub.git
synced 2026-08-14 00:47:57 +00:00
Stabilize local-auth e2e tests under CI/Testbox pressure by hardening publish scan enqueue recovery, bounded publish navigation, route/hydration helpers, and local-auth readiness probes.
90 lines
2.4 KiB
YAML
90 lines
2.4 KiB
YAML
name: Crabbox Testbox Backend
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
testbox_id:
|
|
type: string
|
|
description: "Testbox session ID"
|
|
required: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
BUN_VERSION: "1.3.10"
|
|
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
|
|
|
|
jobs:
|
|
check:
|
|
name: "check"
|
|
runs-on: blacksmith-8vcpu-ubuntu-2404
|
|
timeout-minutes: 30
|
|
steps:
|
|
- name: Begin Testbox
|
|
uses: useblacksmith/begin-testbox@233448af4bfdc6fca509a7f0974411ac6d8a8043
|
|
with:
|
|
testbox_id: ${{ inputs.testbox_id }}
|
|
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 50
|
|
|
|
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
|
|
with:
|
|
bun-version: ${{ env.BUN_VERSION }}
|
|
|
|
- name: Restore Bun install cache
|
|
id: bun-cache
|
|
uses: actions/cache/restore@v5
|
|
with:
|
|
path: ~/.bun/install/cache
|
|
key: ${{ runner.os }}-bun-${{ env.BUN_VERSION }}-${{ hashFiles('bun.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-bun-${{ env.BUN_VERSION }}-
|
|
|
|
- name: Install
|
|
run: bun install --frozen-lockfile
|
|
|
|
- name: Save Bun install cache
|
|
if: steps.bun-cache.outputs.cache-hit != 'true'
|
|
uses: actions/cache/save@v5
|
|
continue-on-error: true
|
|
with:
|
|
path: ~/.bun/install/cache
|
|
key: ${{ steps.bun-cache.outputs.cache-primary-key }}
|
|
|
|
- name: Prepare Testbox shell
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
|
|
git fetch --no-tags --depth=50 origin "+refs/heads/main:refs/remotes/origin/main"
|
|
|
|
link_tool() {
|
|
local src="$1"
|
|
local dest="$2"
|
|
if [ "$src" = "$dest" ]; then
|
|
return 0
|
|
fi
|
|
sudo ln -sf "$src" "$dest"
|
|
}
|
|
|
|
bun_bin="$(command -v bun)"
|
|
link_tool "$bun_bin" /usr/local/bin/bun
|
|
|
|
if command -v bunx >/dev/null 2>&1; then
|
|
link_tool "$(command -v bunx)" /usr/local/bin/bunx
|
|
fi
|
|
|
|
node_bin="$(dirname "$(node -p 'process.execPath')")"
|
|
link_tool "$node_bin/node" /usr/local/bin/node
|
|
link_tool "$node_bin/npm" /usr/local/bin/npm
|
|
link_tool "$node_bin/npx" /usr/local/bin/npx
|
|
|
|
- name: Run Testbox
|
|
uses: useblacksmith/run-testbox@3f60ff9ceb2c10c3feefa87dc0c6490cffae059d
|
|
if: always()
|
|
env:
|
|
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
|