Skip to content

feat(pm): expose embeddable command library #5245

feat(pm): expose embeddable command library

feat(pm): expose embeddable command library #5245

Workflow file for this run

name: utooweb-ci
on:
push:
branches: ["next"]
pull_request:
types: [opened, synchronize, reopened, edited]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
name: utooweb-ci-build-and-e2e
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Init git submodules
run: git submodule update --init --recursive --depth 1
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2026-07-29
targets: wasm32-unknown-unknown
components: rust-src
# - name: Cache cargo
# uses: Swatinem/rust-cache@v2
# with:
# shared-key: utooweb-ci
- name: Setup Utoo
uses: utooland/setup-utoo@v1
with:
utoo-version: 1.0.32
- name: Install dependencies
run: |
utoo install
npm install binaryen@123.0.0 --global
- name: Install wasm-bindgen-cli
uses: jetli/wasm-bindgen-action@v0.2.0
with:
version: '0.2.108'
- name: Build @utoo/web
run: |
npm run build:local --workspace @utoo/web
ls packages/utoo-web/esm/utoo
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium
- name: Run utooweb demo e2e
run: |
set -euo pipefail
DEMO_URL="http://127.0.0.1:8081"
DEMO_LOG="/tmp/utooweb-demo.log"
npm run start --workspace utooweb-demo > "$DEMO_LOG" 2>&1 &
SERVER_PID=$!
cleanup() {
kill "$SERVER_PID" 2>/dev/null || true
}
trap cleanup EXIT
wait_for_demo() {
local timeout_seconds=120
local deadline=$((SECONDS + timeout_seconds))
echo "Waiting for utooweb-demo at $DEMO_URL"
until curl -fsS "$DEMO_URL" >/dev/null 2>&1; do
if ! kill -0 "$SERVER_PID" 2>/dev/null; then
echo "utooweb-demo exited before it became ready"
cat "$DEMO_LOG"
exit 1
fi
if [ "$SECONDS" -ge "$deadline" ]; then
echo "Timed out waiting for utooweb-demo after ${timeout_seconds}s"
cat "$DEMO_LOG"
exit 1
fi
sleep 1
done
echo "utooweb-demo is ready"
}
wait_for_demo
UTOOWEB_DEMO_URL="$DEMO_URL" npm run test:e2e:utooweb
- name: Upload e2e artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: utooweb-e2e-artifacts
path: |
playwright-report
test-results
/tmp/utooweb-demo.log
success:
name: utooweb-ci-success
runs-on: ubuntu-latest
if: always()
needs:
- build
steps:
- name: Check success
run: |
if [ "${{ needs.build.result }}" == "failure" ] || [ "${{ needs.build.result }}" == "cancelled" ]; then
echo "Tests failed or were cancelled"
exit 1
else
echo "Tests passed or were skipped"
fi