From af3ab82f4e71299171ede1b49b82cb71081ef7c0 Mon Sep 17 00:00:00 2001 From: "Andrey K. Choi" Date: Thu, 11 Sep 2025 11:53:31 +0900 Subject: [PATCH] =?UTF-8?q?emoji-freeecho=20"=D0=9F=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=D0=B5=D1=80=D0=BA=D0=B0=20=D0=BD=D0=B0=20=D0=BD=D0=B0=D0=BB?= =?UTF-8?q?=D0=B8=D1=87=D0=B8=D0=B5=20=D1=8D=D0=BC=D0=BE=D0=B4=D0=B6=D0=B8?= =?UTF-8?q?=20=D0=B2=20.drone.yml:"=20&&=20\=20grep=20-n=20"=F0=9F=94=A7\|?= =?UTF-8?q?=F0=9F=9A=80\|=F0=9F=93=9D\|=F0=9F=91=A4\|=F0=9F=93=85\|?= =?UTF-8?q?=E2=9C=85\|=F0=9F=94=8D\|=F0=9F=8E=A8\|=F0=9F=93=A6\|?= =?UTF-8?q?=F0=9F=A7=AA\|=F0=9F=94=92\|=F0=9F=9B=A1=EF=B8=8F\|=F0=9F=90=B3?= =?UTF-8?q?\|=F0=9F=94=A8\|=F0=9F=93=8A\|=F0=9F=93=88\|=F0=9F=93=8B\|?= =?UTF-8?q?=F0=9F=8C=BF\|=F0=9F=8F=97=EF=B8=8F\|=F0=9F=8E=89"=20.drone.yml?= =?UTF-8?q?=20||=20echo=20"=E2=9C=85=20=D0=AD=D0=BC=D0=BE=D0=B4=D0=B6?= =?UTF-8?q?=D0=B8=20=D0=BD=D0=B5=20=D0=BD=D0=B0=D0=B9=D0=B4=D0=B5=D0=BD?= =?UTF-8?q?=D1=8B"=20&&=20\=20echo=20""=20&&=20\=20echo=20"=D0=A0=D0=B0?= =?UTF-8?q?=D0=B7=D0=BC=D0=B5=D1=80=20=D1=84=D0=B0=D0=B9=D0=BB=D0=B0:"=20&?= =?UTF-8?q?&=20\=20wc=20-l=20.drone.yml=20&&=20\=20echo=20""=20&&=20\=20ec?= =?UTF-8?q?ho=20"=D0=9F=D0=B5=D1=80=D0=B2=D1=8B=D0=B5=20=D0=BD=D0=B5=D1=81?= =?UTF-8?q?=D0=BA=D0=BE=D0=BB=D1=8C=D0=BA=D0=BE=20=D1=81=D1=82=D1=80=D0=BE?= =?UTF-8?q?=D0=BA:"=20&&=20\=20head=20-10=20.drone.yml=20emoji-free?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 68 +++++++++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/.drone.yml b/.drone.yml index e405e8a..39b580a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,54 +6,54 @@ steps: - name: install-deps image: python:3.12-slim commands: - - echo "๐Ÿ”ง Installing dependencies..." + - echo "Installing dependencies..." - pip install --upgrade pip - pip install -r requirements.txt - - echo "โœ… Dependencies installed" + - echo "Dependencies installed" - name: prepare image: alpine/git:latest commands: - - echo "๐Ÿš€ Pipeline started for branch ${DRONE_BRANCH}" - - echo "๐Ÿ“ Commit: $(echo ${DRONE_COMMIT_SHA} | cut -c1-8)" - - echo "๐Ÿ‘ค Author: ${DRONE_COMMIT_AUTHOR}" - - echo "๐Ÿ“… Build: ${DRONE_BUILD_NUMBER}" + - echo "Pipeline started for branch ${DRONE_BRANCH}" + - echo "Commit: $(echo ${DRONE_COMMIT_SHA} | cut -c1-8)" + - echo "Author: ${DRONE_COMMIT_AUTHOR}" + - echo "Build: ${DRONE_BUILD_NUMBER}" - git --version - name: lint image: python:3.12-slim commands: - - echo "๐Ÿ” Installing linting tools..." + - echo "Installing linting tools..." - pip install flake8 black isort - - echo "๐ŸŽจ Running Black formatter check..." + - echo "Running Black formatter check..." - black --check --diff src/ config/ tools/ tests/ || true - - echo "๐Ÿ“ฆ Running isort import sorting check..." + - echo "Running isort import sorting check..." - isort --check-only --diff src/ config/ tools/ tests/ || true - - echo "๐Ÿ”ง Running flake8 linting..." + - echo "Running flake8 linting..." - flake8 src/ config/ tools/ tests/ --max-line-length=88 --extend-ignore=E203,W503 || true - - echo "โœ… Linting completed" + - echo "Linting completed" - name: test image: python:3.12-slim commands: - - echo "๐Ÿงช Installing test dependencies..." + - echo "Installing test dependencies..." - pip install -r requirements.txt - pip install pytest - - echo "๐Ÿš€ Running tests..." + - echo "Running tests..." - python -m pytest tests/ -v --tb=short || true - python tests/test_bot.py || true - - echo "โœ… Tests completed" + - echo "Tests completed" - name: security image: python:3.12-slim commands: - - echo "๐Ÿ”’ Installing security tools..." + - echo "Installing security tools..." - pip install safety bandit - - echo "๐Ÿ›ก๏ธ Running safety check..." + - echo "Running safety check..." - safety check --json || true - - echo "๐Ÿ” Running bandit security check..." + - echo "Running bandit security check..." - bandit -r src/ -f json || true - - echo "โœ… Security checks completed" + - echo "Security checks completed" - name: docker-build image: docker:dind @@ -61,12 +61,12 @@ steps: - name: dockersock path: /var/run/docker.sock commands: - - echo "๐Ÿณ Docker version info:" + - echo "Docker version info:" - docker version - - echo "๐Ÿ”จ Building Docker image..." + - echo "Building Docker image..." - docker build -t ${DRONE_REPO_NAME}:latest . - docker tag ${DRONE_REPO_NAME}:latest quiz-bot:${DRONE_COMMIT_SHA} - - echo "๐Ÿ“ฆ Docker build completed" + - echo "Docker build completed" - docker images | grep -E "${DRONE_REPO_NAME}|quiz-bot" || true - name: docker-test @@ -75,30 +75,30 @@ steps: - name: dockersock path: /var/run/docker.sock commands: - - echo "๐Ÿงช Testing Docker image..." - - docker run --rm ${DRONE_REPO_NAME}:latest python -c "import src.bot; print('โœ… Bot import successful')" || true - - docker run --rm ${DRONE_REPO_NAME}:latest python -c "import config.config; print('โœ… Config import successful')" || true - - echo "โœ… Docker tests completed" + - echo "Testing Docker image..." + - docker run --rm ${DRONE_REPO_NAME}:latest python -c "import src.bot; print('Bot import successful')" || true + - docker run --rm ${DRONE_REPO_NAME}:latest python -c "import config.config; print('Config import successful')" || true + - echo "Docker tests completed" - name: quality image: python:3.12-slim commands: - - echo "๐Ÿ“Š Installing quality tools..." + - echo "Installing quality tools..." - pip install flake8 radon - - echo "๐Ÿ“ˆ Calculating code metrics..." + - echo "Calculating code metrics..." - radon cc src/ -s || true - radon mi src/ -s || true - - echo "โœ… Quality check completed" + - echo "Quality check completed" - name: notify image: alpine:latest commands: - - echo "๐Ÿ“‹ Pipeline Summary:" - - echo "๐ŸŒฟ Branch: ${DRONE_BRANCH}" - - echo "๐Ÿ“ Commit: $(echo ${DRONE_COMMIT_SHA} | cut -c1-8)" - - echo "๐Ÿ—๏ธ Build: #${DRONE_BUILD_NUMBER}" - - echo "๐Ÿ‘ค Author: ${DRONE_COMMIT_AUTHOR}" - - echo "๐ŸŽ‰ Quiz Bot CI Pipeline completed!" + - echo "Pipeline Summary:" + - echo "Branch: ${DRONE_BRANCH}" + - echo "Commit: $(echo ${DRONE_COMMIT_SHA} | cut -c1-8)" + - echo "Build: #${DRONE_BUILD_NUMBER}" + - echo "Author: ${DRONE_COMMIT_AUTHOR}" + - echo "Quiz Bot CI Pipeline completed!" volumes: - name: dockersock