From b2b42c608679b86352c2da56af3dff1764ab2f32 Mon Sep 17 00:00:00 2001 From: Valentin Gologuzov Date: Sun, 12 Nov 2023 00:51:14 +0100 Subject: [PATCH] Fixed GHA to run terrarium mypy tests --- .github/workflows/terrarium_check.yaml | 8 +++++--- terrarium/bi_ci/pyproject.toml | 4 ++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/terrarium_check.yaml b/.github/workflows/terrarium_check.yaml index 0a233e0c6..8b1223493 100644 --- a/.github/workflows/terrarium_check.yaml +++ b/.github/workflows/terrarium_check.yaml @@ -32,16 +32,17 @@ jobs: - run: git config --global --add safe.directory /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }} - name: Setup common tools run: pip install --no-input poetry pytest + - run: poetry config virtualenvs.create false - name: Install dependencies run: | cd "terrarium/${{ matrix.value }}" - pip install --no-input . + poetry install --with mypy --without pytest - name: Pytest run: | cd "terrarium/${{ matrix.value }}" pytest . - mypu: + mypy: runs-on: [ self-hosted, linux ] container: image: "python:3.11.0" @@ -63,10 +64,11 @@ jobs: - run: git config --global --add safe.directory /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }} - name: Setup common tools run: pip install --no-input poetry mypy + - run: poetry config virtualenvs.create false - name: Install dependencies run: | cd "terrarium/${{ matrix.value }}" - pip install --no-input . + poetry install --with mypy --without pytest - name: Mypy run: | cd "terrarium/${{ matrix.value }}" diff --git a/terrarium/bi_ci/pyproject.toml b/terrarium/bi_ci/pyproject.toml index 8ad8abda0..06d046555 100644 --- a/terrarium/bi_ci/pyproject.toml +++ b/terrarium/bi_ci/pyproject.toml @@ -30,8 +30,12 @@ clize = ">=5.0.0" poetry = ">=1.5.0" pyyaml = ">=6.0.1" +[tool.poetry.group.pytest.dependencies] +pytest = ">=7.4.3" + [tool.poetry.group.mypy.dependencies] types_PyYAML = "*" +mypy = ">= 1.7.0" [tool.poetry.scripts] detect-affected-packages = "bi_ci.detect_affected_packages:main"