ci: Create .env.test file during testing step
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
12
.drone.yml
12
.drone.yml
@@ -9,7 +9,6 @@ trigger:
|
||||
- push
|
||||
|
||||
steps:
|
||||
# Шаг 'docker-login' остается без изменений
|
||||
- name: docker-login
|
||||
image: docker:latest
|
||||
environment:
|
||||
@@ -20,20 +19,25 @@ steps:
|
||||
commands:
|
||||
- echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
|
||||
|
||||
# Шаг 'testing' остается без изменений
|
||||
# --- ИЗМЕНЕНИЕ ЗДЕСЬ ---
|
||||
- name: testing
|
||||
image: python:3.11-slim
|
||||
commands:
|
||||
# 1. Создаем .env.test файл для pytest ПЕРЕД установкой зависимостей
|
||||
- echo 'YANDEX_CLIENT_ID="test_id"' > .env.test
|
||||
- echo 'YANDEX_CLIENT_SECRET="test_secret"' >> .env.test
|
||||
|
||||
# 2. Устанавливаем зависимости
|
||||
- pip install poetry
|
||||
- poetry install
|
||||
|
||||
# 3. Запускаем тесты
|
||||
- poetry run pytest -v
|
||||
|
||||
# ИЗМЕНЕНИЕ ЗДЕСЯ
|
||||
- name: deploy
|
||||
image: appleboy/drone-ssh
|
||||
settings:
|
||||
host: 45.86.181.80
|
||||
# ЯВНО УКАЗЫВАЕМ ПРАВИЛЬНЫЙ ПОРТ ДЛЯ SSH
|
||||
port: 2223
|
||||
username: orlov
|
||||
key:
|
||||
|
||||
Reference in New Issue
Block a user