Something went wrong. Try again.
small gleam coding and (not yet) persistent agent daemon with a detachable cli forked from okami.mom/albedo
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970#!/usr/bin/env bash# Every check that must pass before a commit.## The quick checks run first, in order. Then the daemon is compiled once and# every suite runs at the same time, each into its own log, which is printed# only if that suite fails. The e2e suites boot their daemons from that one# snapshot (ALBEDO_TEST_DAEMON) instead of through gleam, so none of them waits# on the build lock `gleam test` holds for its whole run. test/manual is opt-in# and not run here; those harnesses need a provider, a PTY, or artifacts from# an earlier benchmark run.set -euo pipefailcd "$(dirname "$0")"export ALBEDO_NO_BROWSER=1# a detached kernel a suite left behind ends soon after, not in an hourexport ALBEDO_KERNEL_GRACE_SECONDS=20
ruff checkruff format --check priv/python testty checkgleam format --check src testtest/gleam-lint.shcargo test --quiet --release --locked --manifest-path native/render/Cargo.tomlnative/render/install.shgo -C cli/tools/apigen run . -checkgo -C cli vet ./...# the Python e2e suite drives the CLI through this binarygo -C cli build -o bin/albedo ./cmd/albedo
scratch="${ALBEDO_TEST_TMP:-/tmp/albedo-tests}/gate-$$"mkdir -p "$scratch"trap 'rm -rf "$scratch"' EXITALBEDO_TEST_DAEMON="$(test/snapshot-daemon.sh "$scratch/daemon")"export ALBEDO_TEST_DAEMON
names=()pids=()log() { echo "$scratch/${1//[\/ ]/-}.log"}suite() { local name="$1" shift "$@" >"$(log "$name")" 2>&1 & names+=("$name") pids+=("$!")}
suite "gleam test" gleam testfor test in test/harness/*_test.py; do suite "$test" python3 test/python_test_runner.py "$test"donesuite "go test" go -C cli test ./internal/... ./cmd/...# the Go e2e suite builds its own CLI and boots a hermetic daemon, so it must# never reuse a cached run. Bound parallel scenarios while the other suites run.go_parallel="$(python3 -c 'import os; print(max(1, min(4, (os.cpu_count() or 1) // 4)))')"suite "go e2e" go -C cli test -count=1 -parallel="$go_parallel" ./test/e2esuite "python e2e" python3 test/e2e/run.py
failed=0for i in "${!pids[@]}"; do if wait "${pids[$i]}"; then echo "ok ${names[$i]}" else failed=1 echo "FAILED ${names[$i]}" cat "$(log "${names[$i]}")" fidoneexit "$failed"