refactor(tests): Simplify test setup and fix client fixture
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
13
.drone.yml
13
.drone.yml
@@ -19,17 +19,18 @@ steps:
|
||||
commands:
|
||||
- echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
|
||||
|
||||
# --- ИЗМЕНЕНИЕ ЗДЕСЬ ---
|
||||
- name: testing
|
||||
image: python:3.11-slim
|
||||
# Передаем фейковые секреты напрямую в окружение этого шага
|
||||
environment:
|
||||
YANDEX_CLIENT_ID: "test_id_from_drone"
|
||||
YANDEX_CLIENT_SECRET: "test_secret_from_drone"
|
||||
commands:
|
||||
# Команды создания .env.test больше не нужны
|
||||
# 1. Создаем .env файл. pydantic-settings его найдет и использует.
|
||||
- echo 'YANDEX_CLIENT_ID="test_id"' > .env
|
||||
- echo 'YANDEX_CLIENT_SECRET="test_secret"' >> .env
|
||||
|
||||
# 2. Устанавливаем зависимости
|
||||
- pip install poetry
|
||||
- poetry install
|
||||
|
||||
# 3. Запускаем тесты
|
||||
- poetry run pytest -v
|
||||
|
||||
- name: deploy
|
||||
|
||||
Reference in New Issue
Block a user