66 lines · 2.4 KB · Shell
RawDownload
#!/usr/bin/env bash set -euo pipefail ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"cd "${ROOT_DIR}" if [[ -d /workspace/.cargo && -d /workspace/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin ]]; then	export CARGO_HOME=/workspace/.cargo	export RUSTUP_HOME=/workspace/.rustup	export PATH="/workspace/.cargo/bin:${PATH}"	export RUSTC=/workspace/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc	export RUSTDOC=/workspace/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustdocfi run_step() {	echo	echo "==> $*"	"$@"} if [[ "${CI_FORK_PULL_REQUEST:-0}" == "1" ]]; then	NETWORK_ENV=()else	NETWORK_ENV=("AGENTOS_E2E_NETWORK=1")fi run_step pnpm install --frozen-lockfilerun_step pnpm buildrun_step pnpm --dir scripts/publish run check-typesrun_step pnpm --dir scripts/publish testrun_step node --test scripts/check-rust-package-metadata.test.mjsrun_step node scripts/check-rust-package-metadata.mjsrun_step node --test scripts/check-agentos-client-protocol-compat.test.mjsrun_step node scripts/check-agentos-client-protocol-compat.mjsrun_step pnpm check-layoutrun_step node --test scripts/generate-secure-exec-mirror.test.mjsif [[ -f scripts/check-registry-test-runtime-boundary.test.mjs ]]; then	run_step node --test scripts/check-registry-test-runtime-boundary.test.mjs	run_step node scripts/check-registry-test-runtime-boundary.mjsfiif [[ -f scripts/check-registry-software-split.test.mjs ]]; then	run_step node --test scripts/check-registry-software-split.test.mjs	run_step node scripts/check-registry-software-split.mjsfi# cargo-fmt ignores workspace.default-members at a virtual workspace root, so# use the shared selector to keep retained browser sources out of native CI.run_step node --test scripts/check-rustfmt.test.mjsrun_step node scripts/check-rustfmt.mjs# Browser support is retained in-tree but disabled during the unified native# sidecar reactor migration, so it must not gate native CI.run_step cargo clippy --workspace --exclude agentos-sidecar-browser --exclude agentos-native-sidecar-browser --all-targets -- -D warningsrun_step cargo test -p agentos-protocol -- --test-threads=1run_step cargo test -p agentos-sidecar -- --test-threads=1run_step cargo test -p agentos-client -- --test-threads=1run_step pnpm check-typesrun_step pnpm lint echoif [[ ${#NETWORK_ENV[@]} -gt 0 ]]; then	echo "==> AGENTOS_E2E_NETWORK=1 pnpm test"	env "${NETWORK_ENV[@]}" pnpm testelse	echo "==> pnpm test"	pnpm testfi