Skip to content

Commit

Permalink
Dedicated GHA flow for terrarium packages (#87)
Browse files Browse the repository at this point in the history
Run mypy for terrarium as well
Cleanup in terrarium/bi_ci
  • Loading branch information
evilkost authored Nov 10, 2023
1 parent f54100d commit e36ea8f
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 24 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/terrarium_check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: terrarium_check

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

on:
pull_request:
workflow_dispatch:


jobs:
pytest:
runs-on: [ self-hosted, linux ]
container:
image: "python:3.11.0"

strategy:
fail-fast: false
matrix:
value:
- bi_ci
- dl_repmanager
name: "🐊[pytest] ${{ matrix.value }}"
steps:
- name: 'Cleanup build folder'
run: |
rm -rf ./* || true
rm -rf ./.??* || true
- name: Checkout code
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
- name: Install dependencies
run: |
cd "terrarium/${{ matrix.value }}"
pip install --no-input .
- name: Pytest
run: |
cd "terrarium/${{ matrix.value }}"
pytest .
mypu:
runs-on: [ self-hosted, linux ]
container:
image: "python:3.11.0"

strategy:
fail-fast: false
matrix:
value:
- bi_ci
- dl_repmanager
name: "🐊[mypy] ${{ matrix.value }}"
steps:
- name: 'Cleanup build folder'
run: |
rm -rf ./* || true
rm -rf ./.??* || true
- name: Checkout code
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
- name: Install dependencies
run: |
cd "terrarium/${{ matrix.value }}"
pip install --no-input .
- name: Mypy
run: |
cd "terrarium/${{ matrix.value }}"
mypy .
2 changes: 0 additions & 2 deletions terrarium/bi_ci/bi_ci_tests/dummy_ext/test_placeholder.py

This file was deleted.

2 changes: 0 additions & 2 deletions terrarium/bi_ci/bi_ci_tests/dummy_fat/test_placeholder.py

This file was deleted.

22 changes: 2 additions & 20 deletions terrarium/bi_ci/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,7 @@ requires = [
[datalens.meta.mypy]
targets = ["bi_ci"]

[datalens.pytest.ext_private]
# just a placeholder to run at least one pytest
root_dir = "bi_ci_tests/"
target_path = "dummy_ext"
labels = ["ext_private"]

[datalens.pytest.ext_public]
# just a placeholder to run at least one pytest
root_dir = "bi_ci_tests/"
target_path = "dummy_ext"
labels = ["ext_public"]

[datalens.pytest.fat]
# just a placeholder to run at least one pytest
root_dir = "bi_ci_tests/"
target_path = "dummy_fat"
labels = ["fat"]

[datalens.pytest.unit]
# just a placeholder to run at least one pytest
root_dir = "bi_ci_tests/"
target_path = "unit"

Expand All @@ -47,6 +28,7 @@ python = ">=3.10, <3.12"
tomlkit = ">=0.11.8"
clize = ">=5.0.0"
poetry = ">=1.5.0"
pyyaml = ">=6.0.1"

[tool.poetry.scripts]
detect-affected-packages = "bi_ci.detect_affected_packages:main"
Expand All @@ -60,7 +42,7 @@ execute-mypy-multi = "bi_ci.execute_mypy_multi:cmd"
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra"
testpaths = ["bi_ci_tests"]
testpaths = ["bi_ci_tests/unit"]

[tool.mypy]
warn_unused_configs = true
Expand Down

0 comments on commit e36ea8f

Please sign in to comment.