chore: improve DX scripts, fix test suite, and harden tooling
All checks were successful
Deploy to Production / test (push) Successful in 32s
All checks were successful
Deploy to Production / test (push) Successful in 32s
Scripts: - remote.sh: remove unused open_browser() function - deploy-remote.sh: add DB backup before deploy, --skip-backup flag, step numbering - db-backup.sh: fix macOS compat (xargs -r is GNU-only), use portable approach - db-restore.sh: add safety backup before restore, SQL file validation, file size display - logs.sh: default to no-follow with --tail=100, order-independent arg parsing - docker-cleanup.sh: add Docker health check, colored output - test-sequential.sh: exclude *.integration.test.ts by default, add --integration flag - simulate-ci.sh: pass --integration flag (has real DB) Tests: - db.test.ts: fix mock path from ./DrizzleClient to @shared/db/DrizzleClient - server.settings.test.ts: rewrite mocks for gameSettingsService (old config/saveConfig removed) - server.test.ts: add missing config.lootdrop and BotClient mocks, complete DrizzleClient chain - indexes.test.ts: rename to indexes.integration.test.ts (requires live DB) Config: - package.json: test script uses sequential runner, add test:ci and db:restore aliases - deploy.yml: use --integration flag in CI (has Postgres service)
This commit is contained in:
@@ -1,8 +1,17 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
INCLUDE_INTEGRATION=false
|
||||
if [[ "$1" == "--integration" ]]; then
|
||||
INCLUDE_INTEGRATION=true
|
||||
fi
|
||||
|
||||
echo "🔍 Finding test files..."
|
||||
TEST_FILES=$(find . -name "*.test.ts" -not -path "*/node_modules/*")
|
||||
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!"
|
||||
@@ -10,6 +19,10 @@ if [ -z "$TEST_FILES" ]; then
|
||||
fi
|
||||
|
||||
echo "🧪 Running tests sequentially..."
|
||||
if [ "$INCLUDE_INTEGRATION" = true ]; then
|
||||
echo " (including integration tests)"
|
||||
fi
|
||||
|
||||
FAILED=0
|
||||
|
||||
for FILE in $TEST_FILES; do
|
||||
|
||||
Reference in New Issue
Block a user