ci: Update test database host in deployment workflow and add support for running specific tests in the CI simulation script.
Some checks failed
Deploy to Production / test (push) Failing after 38s
Deploy to Production / build (push) Has been skipped
Deploy to Production / deploy (push) Has been skipped

This commit is contained in:
syntaxbullet
2026-01-30 16:42:59 +01:00
parent 62c6ca5e87
commit 95f1b4e04a
2 changed files with 18 additions and 7 deletions

View File

@@ -78,7 +78,7 @@ jobs:
- name: Setup Test Database
run: bun run db:push:local
env:
DATABASE_URL: postgresql://postgres:postgres@127.0.0.1:5432/aurora_test
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/aurora_test
# Create .env.test for implicit usage by bun
DISCORD_BOT_TOKEN: test_token
DISCORD_CLIENT_ID: 123
@@ -88,7 +88,7 @@ jobs:
run: |
# Create .env.test for test-sequential.sh / bun test
cat <<EOF > .env.test
DATABASE_URL="postgresql://postgres:postgres@127.0.0.1:5432/aurora_test"
DATABASE_URL="postgresql://postgres:postgres@postgres:5432/aurora_test"
DISCORD_BOT_TOKEN="test_token"
DISCORD_CLIENT_ID="123456789"
DISCORD_GUILD_ID="123456789"

View File

@@ -82,12 +82,23 @@ export LOG_LEVEL="error"
# 5. Run Tests
echo "🧪 Running Tests..."
if bash shared/scripts/test-sequential.sh; then
echo "✅ CI Simulation Passed!"
EXIT_CODE=0
if [ -n "$1" ]; then
echo "Running specific test: $1"
if bun test "$1"; then
echo "✅ Specific Test Passed!"
EXIT_CODE=0
else
echo "❌ Specific Test Failed!"
EXIT_CODE=1
fi
else
echo "❌ CI Simulation Failed!"
EXIT_CODE=1
if bash shared/scripts/test-sequential.sh; then
echo "✅ CI Simulation Passed!"
EXIT_CODE=0
else
echo "❌ CI Simulation Failed!"
EXIT_CODE=1
fi
fi
# 6. Cleanup