forked from syntaxbullet/aurorabot
feat: Implement a sequential test runner script and integrate it into the deploy workflow.
This commit is contained in:
2
.github/workflows/deploy.yml
vendored
2
.github/workflows/deploy.yml
vendored
@@ -31,7 +31,7 @@ jobs:
|
|||||||
run: bun install --frozen-lockfile
|
run: bun install --frozen-lockfile
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: bun test
|
run: bash shared/scripts/test-sequential.sh
|
||||||
|
|
||||||
# ==========================================================================
|
# ==========================================================================
|
||||||
# Build Job
|
# Build Job
|
||||||
|
|||||||
36
shared/scripts/test-sequential.sh
Executable file
36
shared/scripts/test-sequential.sh
Executable file
@@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "🔍 Finding test files..."
|
||||||
|
TEST_FILES=$(find . -name "*.test.ts" -not -path "*/node_modules/*")
|
||||||
|
|
||||||
|
if [ -z "$TEST_FILES" ]; then
|
||||||
|
echo "⚠️ No test files found!"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "🧪 Running tests sequentially..."
|
||||||
|
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
|
||||||
Reference in New Issue
Block a user