Skip to content

Commit

Permalink
Fixed GHA to run terrarium mypy tests
Browse files Browse the repository at this point in the history
  • Loading branch information
evilkost committed Nov 11, 2023
1 parent a739c2c commit f5dfe39
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/terrarium_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,18 @@ jobs:
uses: actions/checkout@v4
- 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: pip install --no-input poetry
- 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"
Expand All @@ -62,11 +63,12 @@ jobs:
uses: actions/checkout@v4
- 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: pip install --no-input poetry
- 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 }}"
Expand Down
4 changes: 4 additions & 0 deletions terrarium/bi_ci/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 6 additions & 2 deletions terrarium/dl_repmanager/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ tomlkit = "==0.11.8"
requests = ">=2.31.0"
datalens-cli-tools = {path = "../dl_cli_tools"}

[tool.poetry.group.tests.dependencies]
pytest = ">=7.2.2"
[tool.poetry.group.pytest.dependencies]
pytest = ">=7.4.3"

[tool.poetry.group.mypy.dependencies]
types_PyYAML = "*"
mypy = ">= 1.7.0"

[build-system]
requires = ["poetry-core"]
Expand Down

0 comments on commit f5dfe39

Please sign in to comment.