Files
elizaos--eliza/.github/workflows/test-packaging.yml
T
wehub-resource-sync 426e9eeabd
Voice Workbench / headless workbench (mocked backends) (push) Has been cancelled
Voice Workbench / real acoustic lane (nightly, provisioned only) (push) Has been cancelled
ci / test (push) Has been cancelled
ci / lint-and-format (push) Has been cancelled
ci / build (push) Has been cancelled
ci / dev-startup (push) Has been cancelled
gitleaks / gitleaks (push) Has been cancelled
Markdown Links / Relative Markdown Links (push) Has been cancelled
Quality (Extended) / Homepage Build (PR smoke) (push) Has been cancelled
Quality (Extended) / Comment-only diff guard (push) Has been cancelled
Quality (Extended) / Format + Type Safety Ratchet (push) Has been cancelled
Quality (Extended) / Develop Gate (secret scan + UI determinism) (push) Has been cancelled
Quality (Extended) / Develop Gate (lint) (push) Has been cancelled
Chat shell gestures / Chat shell gesture + parity e2e (push) Has been cancelled
Cloud Gateway Discord / Test (push) Has been cancelled
Benchmark Bridge Tests / benchmark (bunx @biomejs/biome check packages/lifeops-bench/src, benchmark-lint) (push) Has been cancelled
Benchmark Bridge Tests / benchmark (bunx vitest run --config packages/lifeops-bench/vitest.config.ts --root packages/lifeops-bench --passWithNoTests, benchmark-tests) (push) Has been cancelled
Build Agent Image / build-and-push (push) Has been cancelled
Dev Smoke / bun run dev onboarding chat (push) Has been cancelled
Dev Smoke / Vite HMR dependency-level smoke (push) Has been cancelled
Electrobun Submodule Guard / electrobun gitlink is fetchable (push) Has been cancelled
Publish @elizaos/example-code / check_npm (push) Has been cancelled
Publish @elizaos/example-code / publish_npm (push) Has been cancelled
Publish @elizaos/plugin-elizacloud / verify_version (push) Has been cancelled
Publish @elizaos/plugin-elizacloud / publish_npm (push) Has been cancelled
Sandbox Live Smoke / Sandbox live smoke (push) Has been cancelled
Snap Build & Test / Build Snap (amd64) (push) Has been cancelled
Snap Build & Test / Build Snap (arm64) (push) Has been cancelled
Test Packaging / elizaos CLI global-install smoke (node + bun) (push) Has been cancelled
Cloud Gateway Webhook / Test (push) Has been cancelled
Cloud Tests / lint-and-types (push) Has been cancelled
Cloud Tests / unit-tests (push) Has been cancelled
Cloud Tests / integration-tests (push) Has been cancelled
Cloud Tests / e2e-tests (push) Has been cancelled
CodeQL Advanced / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Apps Worker (Product 2) / Determine environment (push) Has been cancelled
Deploy Apps Worker (Product 2) / Deploy apps worker to apps-control host (${{ needs.determine-env.outputs.environment }}) (push) Has been cancelled
Deploy Eliza Provisioning Worker / Determine environment (push) Has been cancelled
Deploy Eliza Provisioning Worker / Deploy worker to Hetzner host (${{ needs.determine-env.outputs.environment }} @ ${{ needs.determine-env.outputs.deployment_sha }}) (push) Has been cancelled
Dev Smoke / Classify changed paths (push) Has been cancelled
supply-chain / sbom (push) Has been cancelled
supply-chain / vulnerability-scan (push) Has been cancelled
Build, Push & Deploy to Phala Cloud / build-and-push (push) Has been cancelled
Test Packaging / Validate Packaging Configs (push) Has been cancelled
Test Packaging / Build & Test PyPI Package (push) Has been cancelled
Test Packaging / PyPI on Python ${{ matrix.python }} (push) Has been cancelled
Test Packaging / Pack & Test JS Tarballs (push) Has been cancelled
UI Fixture E2E / ui-fixture-e2e (push) Has been cancelled
UI Fixture E2E / fixture-e2e (push) Has been cancelled
UI Story Gate / story-gate (push) Has been cancelled
vault-ci / test (macos-latest) (push) Has been cancelled
vault-ci / test (ubuntu-latest) (push) Has been cancelled
vault-ci / test (windows-latest) (push) Has been cancelled
vault-ci / app-core wiring tests (push) Has been cancelled
verify-patches / verify patches/CHECKSUMS.sha256 (push) Has been cancelled
Voice Benchmark Smoke / voice-emotion fixture smoke (push) Has been cancelled
Voice Benchmark Smoke / voiceagentbench fixture smoke (push) Has been cancelled
Voice Benchmark Smoke / voicebench-quality unit smoke (push) Has been cancelled
Voice Benchmark Smoke / voicebench TypeScript unit (no audio) (push) Has been cancelled
Voice Benchmark Smoke / voice bench smoke summary (push) Has been cancelled
Windows CI / windows ([bun run --cwd packages/app-core test bun run --cwd packages/elizaos test bun run --cwd packages/cloud/shared test], app-and-cli) (push) Has been cancelled
Windows CI / windows ([bun run --cwd packages/scenario-runner test bun run --cwd packages/vault test bun run --cwd packages/security test bun run --cwd plugins/plugin-coding-tools test], framework-packages) (push) Has been cancelled
Windows CI / windows ([bun run --cwd plugins/plugin-elizacloud test bun run --cwd plugins/plugin-discord test bun run --cwd plugins/plugin-anthropic test bun run --cwd plugins/plugin-openai test bun run --cwd plugins/plugin-app-control test bun run --cwd plugins/pl… (push) Has been cancelled
Windows CI / windows ([node packages/scripts/run-turbo.mjs run build --filter=@elizaos/core --filter=@elizaos/shared --filter=@elizaos/agent --concurrency=4 node packages/scripts/run-bash-linux-only.mjs scripts/verify-riscv64-buildpaths.sh node packages/scripts/run… (push) Has been cancelled
Windows CI / windows ([node packages/scripts/run-turbo.mjs run typecheck --filter=@elizaos/core --filter=@elizaos/shared --filter=@elizaos/cloud-shared --concurrency=4 bun run --cwd packages/core test bun run --cwd packages/shared test], core-runtime, 75) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:43:05 +08:00

313 lines
11 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Test Packaging
on:
pull_request:
branches: [main]
paths:
- 'packages/app-core/packaging/**'
- 'packages/core/**'
- 'plugins/*/typescript/**'
- 'packages/app-core/scripts/pack-upstreams.mjs'
- 'packages/elizaos/**'
- '.github/workflows/publish-packages.yml'
- '.github/workflows/test-packaging.yml'
push:
branches: [main]
paths:
- 'packages/app-core/packaging/**'
- 'packages/core/**'
- 'plugins/*/typescript/**'
- 'packages/elizaos/**'
workflow_dispatch:
concurrency:
group: test-packaging-${{ github.ref }}
cancel-in-progress: true
# Default to least privilege. Override per-job where needed.
permissions:
contents: read
jobs:
validate:
name: Validate Packaging Configs
runs-on: ${{ fromJSON(vars.HETZNER_FLEET_ONLINE == 'false' && '["ubuntu-24.04"]' || '["self-hosted","hetzner-robot"]') }}
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
with:
# Packaging validation checks source packaging metadata only; native
# inference submodules are validated by dedicated native workflows.
submodules: false
- name: Setup Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1
with:
python-version: "3.14"
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
with:
node-version: "24"
check-latest: false
- name: Install validation dependencies
run: pip install pyyaml build twine
- name: Run packaging validation suite
run: bash packages/app-core/packaging/test-packaging.sh
build-pypi:
name: Build & Test PyPI Package
runs-on: ${{ fromJSON(vars.HETZNER_FLEET_ONLINE == 'false' && '["ubuntu-24.04"]' || '["self-hosted","hetzner-robot"]') }}
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
with:
# PyPI packaging does not need native inference submodules.
submodules: false
- name: Check for PyPI package directory
id: pypi_check
run: |
if [[ -d packages/app-core/packaging/pypi ]]; then
echo "present=true" >> "$GITHUB_OUTPUT"
else
echo "present=false" >> "$GITHUB_OUTPUT"
echo "::notice::packages/app-core/packaging/pypi not present in this branch — skipping PyPI build"
fi
- name: Setup Python
if: steps.pypi_check.outputs.present == 'true'
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1
with:
python-version: "3.14"
- name: Setup Node.js
if: steps.pypi_check.outputs.present == 'true'
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
with:
node-version: "24"
check-latest: false
- name: Build
if: steps.pypi_check.outputs.present == 'true'
working-directory: packages/app-core/packaging/pypi
run: |
pip install build
python -m build
- name: Check dist
if: steps.pypi_check.outputs.present == 'true'
working-directory: packages/app-core/packaging/pypi
run: |
pip install twine
twine check dist/*
- name: Install and test
if: steps.pypi_check.outputs.present == 'true'
working-directory: packages/app-core/packaging/pypi
run: |
pip install dist/*.whl
# Module import test
python -c "
import elizaos_app
print(f'elizaos_app {elizaos_app.__version__}')
assert elizaos_app.__version__
assert hasattr(elizaos_app, 'run')
assert hasattr(elizaos_app, 'ensure_runtime')
assert hasattr(elizaos_app, 'get_version')
"
# Loader unit tests
python -c "
from elizaos_app.loader import (
_parse_version,
_find_node,
_get_node_version,
_check_node,
ElizaOSAppError,
NodeNotFoundError,
RuntimeInstallError,
)
# Version parsing
assert _parse_version('v22.12.0') == (22, 12, 0)
assert _parse_version('v18.0.0') == (18, 0, 0)
assert _parse_version('v1.2.3-nightly') == (1, 2, 3)
assert _parse_version('not-a-version') is None
assert _parse_version('') is None
# Node detection (Node.js is installed in this runner)
node = _find_node()
assert node, 'Node not found on PATH'
ver = _get_node_version(node)
assert ver and ver >= (22, 0, 0), f'Node version too old: {ver}'
checked = _check_node()
assert checked == node
# Exception hierarchy
assert issubclass(NodeNotFoundError, ElizaOSAppError)
assert issubclass(RuntimeInstallError, ElizaOSAppError)
print('All loader unit tests passed')
"
# CLI entry point exists
which elizaos-app
build-pypi-matrix:
name: PyPI on Python ${{ matrix.python }}
runs-on: ${{ fromJSON(vars.HETZNER_FLEET_ONLINE == 'false' && '["ubuntu-24.04"]' || '["self-hosted","hetzner-robot"]') }}
strategy:
matrix:
# PRs run a single Python version; pushes to main/develop run the
# full 3.93.13 matrix. Release publishing re-runs the full matrix.
python: ${{ github.event_name == 'pull_request' && fromJSON('["3.12"]') || fromJSON('["3.9", "3.10", "3.11", "3.12", "3.13"]') }}
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
with:
# PyPI packaging does not need native inference submodules.
submodules: false
- name: Check for PyPI package directory
id: pypi_check
run: |
if [[ -d packages/app-core/packaging/pypi ]]; then
echo "present=true" >> "$GITHUB_OUTPUT"
else
echo "present=false" >> "$GITHUB_OUTPUT"
echo "::notice::packages/app-core/packaging/pypi not present in this branch — skipping PyPI matrix build"
fi
- name: Setup Python ${{ matrix.python }}
if: steps.pypi_check.outputs.present == 'true'
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1
with:
python-version: ${{ matrix.python }}
- name: Setup Node.js
if: steps.pypi_check.outputs.present == 'true'
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
with:
node-version: "24"
check-latest: false
- name: Build and test
if: steps.pypi_check.outputs.present == 'true'
working-directory: packages/app-core/packaging/pypi
run: |
pip install build
python -m build
pip install dist/*.whl
python -c "import elizaos_app; print(f'OK: elizaos_app {elizaos_app.__version__} on Python ${{ matrix.python }}')"
pack-and-test-js:
name: Pack & Test JS Tarballs
runs-on: ${{ fromJSON(vars.HETZNER_FLEET_ONLINE == 'false' && '["ubuntu-24.04"]' || '["self-hosted","hetzner-robot"]') }}
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
with:
# JS tarball packaging does not need native inference submodules.
submodules: false
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
with:
node-version: "24"
check-latest: false
- name: Setup Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
with:
bun-version: "canary"
- name: Install dependencies
run: bun install --ignore-scripts
- name: Materialize bun npm package binary
run: if [ -f node_modules/bun/install.js ]; then (cd node_modules/bun && node install.js); fi
- name: Pack upstream tarballs
run: node packages/app-core/scripts/pack-upstreams.mjs
- name: Verify tarball installation
run: |
set -euo pipefail
ARTIFACTS_DIR="artifacts"
tarballs=("$ARTIFACTS_DIR"/*.tgz)
if [ ! -f "${tarballs[0]}" ]; then
echo "::error::No tarballs found in $ARTIFACTS_DIR"
exit 1
fi
TEST_DIR=$(mktemp -d)
ROOT_DIR="$PWD"
install_paths=()
for tarball in "${tarballs[@]}"; do
install_paths+=("$ROOT_DIR/$tarball")
done
cd "$TEST_DIR"
echo '{"name":"tarball-test","private":true,"type":"module"}' > package.json
npm install "${install_paths[@]}" --ignore-scripts 2>&1
for tarball in "${tarballs[@]}"; do
echo "::group::Checking $(basename "$tarball")"
PKG_NAME=$(tar -xOf "$ROOT_DIR/$tarball" package/package.json | node -e "process.stdin.setEncoding('utf8'); let data = ''; process.stdin.on('data', chunk => data += chunk); process.stdin.on('end', () => console.log(JSON.parse(data).name));")
PKG_MANIFEST="node_modules/${PKG_NAME}/package.json"
test -f "$PKG_MANIFEST"
echo "Installed: $PKG_NAME"
echo "::endgroup::"
done
cd "$ROOT_DIR"
node packages/scripts/rm-path-recursive.mjs "$TEST_DIR"
echo "All JS tarballs passed installation test"
- name: Upload tarball artifacts
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: js-tarballs
path: artifacts/*.tgz
retention-days: 7
elizaos-cli-global-smoke:
name: elizaos CLI global-install smoke (node + bun)
runs-on: ${{ fromJSON(vars.HETZNER_FLEET_ONLINE == 'false' && '["ubuntu-24.04"]' || '["self-hosted","hetzner-robot"]') }}
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
with:
submodules: false
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
with:
node-version: "24"
check-latest: false
- name: Setup Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
with:
bun-version: "canary"
- name: Install dependencies
run: bun install --ignore-scripts
- name: Materialize bun npm package binary
run: if [ -f node_modules/bun/install.js ]; then (cd node_modules/bun && node install.js); fi
# Static guard for #8000: a bin file must not import a dependency subpath
# that the dependency's exports map forbids.
- name: Lint bin exports (#8000 static guard)
run: bun run --cwd packages/elizaos lint:bin-exports
# End-to-end guard for #8000: npm pack -> global install (sandboxed
# --prefix) under npm and bun, then run the bin under both node and bun.
- name: Packaged smoke (global + local install, node + bun)
run: bun run --cwd packages/elizaos test:packaged