Sign panel sessions and isolate test runs
Some checks failed
Deploy to Production / test (push) Failing after 29s

- Replace in-memory auth sessions with signed cookies and signed OAuth state
- Add auth route coverage and update panel/web server wiring
- Switch test script to per-file Bun processes and clean up type checks
This commit is contained in:
syntaxbullet
2026-04-09 21:44:05 +02:00
parent 6abbd4652a
commit 25a0bd3431
25 changed files with 354 additions and 157 deletions

View File

@@ -92,7 +92,7 @@ if [ -n "$1" ]; then
EXIT_CODE=1
fi
else
if bash shared/scripts/test-sequential.sh --integration; then
if bash shared/scripts/test-isolated.sh --integration; then
echo "✅ CI Simulation Passed!"
EXIT_CODE=0
else

42
shared/scripts/test-isolated.sh Executable file
View File

@@ -0,0 +1,42 @@
#!/bin/bash
set -euo pipefail
INCLUDE_INTEGRATION=false
if [[ "${1:-}" == "--integration" ]]; then
INCLUDE_INTEGRATION=true
fi
JOBS="${AURORA_TEST_JOBS:-4}"
echo "🔍 Finding test files..."
if [ "$INCLUDE_INTEGRATION" = true ]; then
FIND_ARGS=( -name "*.test.ts" )
else
FIND_ARGS=( -name "*.test.ts" -not -name "*.integration.test.ts" )
fi
TEST_FILES=()
while IFS= read -r file; do
TEST_FILES+=("$file")
done < <(find . "${FIND_ARGS[@]}" -not -path "*/node_modules/*" | sort)
if [ "${#TEST_FILES[@]}" -eq 0 ]; then
echo "⚠️ No test files found!"
exit 0
fi
echo "🧪 Running ${#TEST_FILES[@]} test files with isolated Bun processes..."
echo " Workers: $JOBS"
if [ "$INCLUDE_INTEGRATION" = true ]; then
echo " (including integration tests)"
fi
if printf '%s\n' "${TEST_FILES[@]}" | xargs -n1 -P "$JOBS" bash -lc 'echo "---------------------------------------------------"; echo "running: $1"; bun test "$1"' _; then
echo "---------------------------------------------------"
echo "✅ All tests passed!"
exit 0
fi
echo "---------------------------------------------------"
echo "❌ Some tests failed."
exit 1

View File

@@ -1,49 +0,0 @@
#!/bin/bash
set -e
INCLUDE_INTEGRATION=false
if [[ "$1" == "--integration" ]]; then
INCLUDE_INTEGRATION=true
fi
echo "🔍 Finding test files..."
if [ "$INCLUDE_INTEGRATION" = true ]; then
TEST_FILES=$(find . -name "*.test.ts" -not -path "*/node_modules/*")
else
TEST_FILES=$(find . -name "*.test.ts" -not -name "*.integration.test.ts" -not -path "*/node_modules/*")
fi
if [ -z "$TEST_FILES" ]; then
echo "⚠️ No test files found!"
exit 0
fi
echo "🧪 Running tests sequentially..."
if [ "$INCLUDE_INTEGRATION" = true ]; then
echo " (including integration tests)"
fi
FAILED=0
for FILE in $TEST_FILES; do
echo "---------------------------------------------------"
echo "running: $FILE"
if bun test "$FILE"; then
echo "✅ passed: $FILE"
else
echo "❌ failed: $FILE"
FAILED=1
# Fail fast
exit 1
fi
done
if [ $FAILED -eq 0 ]; then
echo "---------------------------------------------------"
echo "✅ All tests passed!"
exit 0
else
echo "---------------------------------------------------"
echo "❌ Some tests failed."
exit 1
fi