refactored
Some checks failed
Deploy on push / deploy (push) Failing after 6s

This commit is contained in:
2025-08-17 17:56:31 +03:00
parent e78e12eeee
commit 9a2b792f08
98 changed files with 702 additions and 904 deletions

View File

@@ -137,7 +137,7 @@ jobs:
from orm.shout import Shout
from orm.topic import Topic
from auth.orm import Author, AuthorBookmark, AuthorRating, AuthorFollower
from services.db import engine
from storage.db import engine
from sqlalchemy import inspect
print('✅ Engine imported successfully')
@@ -166,8 +166,8 @@ jobs:
- name: Start servers
run: |
chmod +x scripts/ci-server.py
timeout 300 python scripts/ci-server.py &
chmod +x ./ci-server.py
timeout 300 python ./ci-server.py &
echo $! > ci-server.pid
echo "Waiting for servers..."
@@ -184,8 +184,13 @@ jobs:
# Создаем папку для результатов тестов
mkdir -p test-results
# В CI пропускаем тесты здоровья серверов, так как они могут не пройти
echo "🏥 В CI режиме пропускаем тесты здоровья серверов..."
# Сначала проверяем здоровье серверов
echo "🏥 Проверяем здоровье серверов..."
if uv run pytest tests/test_server_health.py -v; then
echo "✅ Серверы здоровы!"
else
echo "⚠️ Тест здоровья серверов не прошел, но продолжаем..."
fi
for test_type in "not e2e" "integration" "e2e" "browser"; do
echo "Running $test_type tests..."
@@ -284,19 +289,20 @@ jobs:
fetch-depth: 0
- name: Deploy
if: github.ref == 'refs/heads/dev'
env:
HOST_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
TARGET: ${{ github.ref == 'refs/heads/dev' && 'core' || 'discoursio-api' }}
SERVER: ${{ github.ref == 'refs/heads/dev' && 'STAGING' || 'V' }}
run: |
echo "🚀 Deploying to $SERVER..."
echo "🚀 Deploying to $ENV..."
mkdir -p ~/.ssh
echo "$HOST_KEY" > ~/.ssh/known_hosts
chmod 600 ~/.ssh/known_hosts
git remote add dokku dokku@v3.dscrs.site:core
git remote add dokku dokku@staging.discours.io:$TARGET
git push dokku HEAD:main -f
echo "✅ deployment completed!"
echo "✅ $ENV deployment completed!"
# ===== SUMMARY =====
summary: