From 0dc246a3c7a1bbaa3c6aec9bcfe176cf97924f8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=BE=D0=B7=D0=BB=D0=BE=D0=B2?= Date: Wed, 8 Nov 2023 16:55:13 +0300 Subject: [PATCH] init: - poetry CI --- .github/workflows/mypy_flake.yml | 44 +++++++++++++++++--------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/.github/workflows/mypy_flake.yml b/.github/workflows/mypy_flake.yml index 66efbcf2..8ffbda57 100644 --- a/.github/workflows/mypy_flake.yml +++ b/.github/workflows/mypy_flake.yml @@ -1,30 +1,32 @@ -name: flake8 Lint +name: CI on: [push, pull_request] jobs: - flake8-lint: + lint: runs-on: ubuntu-latest - name: Проверка flake8 + name: Статический анализ. Линтеры flake8 и mypy steps: - - name: Check out source repository - uses: actions/checkout@v3 - - name: Set up Python environment + - name: Установка Python uses: actions/setup-python@v4 with: - python-version: "3.11" - - name: flake8 Lint - uses: py-actions/flake8@v2 - - run_mypy: - runs-on: ubuntu-latest - name: Mypy - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Run Mypy - uses: jashparekh/mypy-action@v2 + python-version: 3.11 + + - name: Установка Poetry + uses: snok/install-poetry@v1 with: - requirements: - - django-stubs django - - types-openpyxl \ No newline at end of file + poetry-version: 1.7.0 + + - name: Извлечение репозитория + uses: actions/checkout@v4 + + - name: Установка зависимостей + run: | + poetry install + + - name: flake8 + run: | + poetry run flake8 + - name: mypy + run: | + poetry run mypy