Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MacBook Pro authored and MacBook Pro committed Nov 14, 2024
1 parent dfad634 commit 7132a11
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions:
contents: read

jobs:
test:
build:
runs-on: ubuntu-latest

services:
Expand Down Expand Up @@ -51,13 +51,25 @@ jobs:
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run migrations
run: |
alembic upgrade head # или другой инструмент миграции, если используете
# - name: Run migrations
# run: |
# alembic upgrade head # или другой инструмент миграции, если используете

- name: Run tests
env:
# Устанавливаем URL базы для тестов
DATABASE_URL: postgresql://user:password@localhost:5432/test_db
run: |
pytest
pytest
- name: Run app
run: |
nohup uvicorn main:app --host 0.0.0.0 --port 8000 &
- name: Wait for FastAPI
run: |
until curl -s http://localhost:8000/docs; do
echo "Waiting for FastAPI..."
sleep 2
done
echo "FastAPI is up and running"

0 comments on commit 7132a11

Please sign in to comment.