feat(workspace): links to single bullets
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 2m8s
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 2m8s
- copy a link to a bullet from its action bubble or pick a bullet in the link dialog; [[Note#^id|Note › excerpt]] opens the note, jumps to and highlights the bullet, or says it is gone - wiki links render inline with their label and are clickable; the duplicate chip below the text is gone test(e2e): run each suite with its own container, image tag and port, so parallel runs from another working copy no longer remove our server Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d408e7d307
commit
1a49e6b304
12 files changed
+284
-45
No files matched your search
+26
-8
@@ -1,18 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
# Builds MindSift, starts it in demo mode on port 18080 with a fresh database and runs the browser tests.
|
||||
# Builds MindSift, starts it in demo mode with a fresh database and runs the browser tests.
|
||||
# Requires podman (or docker via ENGINE=docker). Usage: e2e/run.sh
|
||||
# Every run uses its own container, image tag and port, so runs from several working copies at the
|
||||
# same time cannot remove or test each other's server.
|
||||
set -euo pipefail
|
||||
ENGINE="${ENGINE:-podman}"
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
WORK="$(mktemp -d)"
|
||||
trap '"$ENGINE" rm -f mindsift-e2e >/dev/null 2>&1 || true; rm -rf "$WORK"' EXIT
|
||||
RUN_ID="$$-$RANDOM"
|
||||
NAME="mindsift-e2e-$RUN_ID"
|
||||
IMAGE="mindsift-e2e-image:$RUN_ID"
|
||||
# A free port above 18000 (E2E_PORT overrides)
|
||||
PORT="${E2E_PORT:-}"
|
||||
if [ -z "$PORT" ]; then
|
||||
for p in $(shuf -i 18100-18999 -n 50); do
|
||||
if ! (exec 3<>"/dev/tcp/127.0.0.1/$p") 2>/dev/null; then PORT="$p"; break; fi
|
||||
done
|
||||
fi
|
||||
cleanup() {
|
||||
"$ENGINE" rm -f "$NAME" >/dev/null 2>&1 || true
|
||||
"$ENGINE" rmi "$IMAGE" >/dev/null 2>&1 || true
|
||||
rm -rf "$WORK"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
echo "Baue Image …"
|
||||
"$ENGINE" build -q -t mindsift-e2e-image "$ROOT" >/dev/null
|
||||
"$ENGINE" run -d --name mindsift-e2e --network host -e PORT=18080 -e MINDA_DEMO=true \
|
||||
-e JWT_SECRET=e2e-only-secret -v "$WORK":/data:Z mindsift-e2e-image >/dev/null
|
||||
for _ in $(seq 1 60); do curl -s -m 1 http://localhost:18080/api/v1/health >/dev/null && break; sleep 0.5; done
|
||||
"$ENGINE" build -q -t "$IMAGE" "$ROOT" >/dev/null
|
||||
"$ENGINE" run -d --name "$NAME" --network host -e PORT="$PORT" -e MINDA_DEMO=true \
|
||||
-e JWT_SECRET=e2e-only-secret -v "$WORK":/data:Z "$IMAGE" >/dev/null
|
||||
for _ in $(seq 1 60); do curl -s -m 1 "http://localhost:$PORT/api/v1/health" >/dev/null && break; sleep 0.5; done
|
||||
|
||||
echo "Starte Browser-Tests …"
|
||||
"$ENGINE" run --rm --network host -v "$ROOT/e2e":/e2e:Z -w /e2e mcr.microsoft.com/playwright:v1.48.2-jammy \
|
||||
echo "Starte Browser-Tests (Port $PORT) …"
|
||||
"$ENGINE" run --rm --network host -e MINDSIFT_URL="http://localhost:$PORT" -v "$ROOT/e2e":/e2e:Z -w /e2e \
|
||||
mcr.microsoft.com/playwright:v1.48.2-jammy \
|
||||
sh -c 'npm install --no-audit --no-fund >/dev/null 2>&1 && node collab.e2e.mjs && node share.e2e.mjs && node lock.e2e.mjs && node channels.e2e.mjs'
|
||||
Reference in new issue
Block a user