diff --git a/.github/workflows/terrarium_check.yaml b/.github/workflows/terrarium_check.yaml new file mode 100644 index 000000000..bf4358523 --- /dev/null +++ b/.github/workflows/terrarium_check.yaml @@ -0,0 +1,46 @@ +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: "🐊 ${{ 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 mypy + - name: Install dependencies + run: | + cd "terrarium/${{ matrix.value }}" + pip install --no-input . + - name: Pytest + run: | + cd "terrarium/${{ matrix.value }}" + pytest . + - name: Mypy + run: | + cd "terrarium/${{ matrix.value }}" + mypy . diff --git a/terrarium/bi_ci/bi_ci_tests/dummy_ext/test_placeholder.py b/terrarium/bi_ci/bi_ci_tests/dummy_ext/test_placeholder.py deleted file mode 100644 index 10cf3ad0a..000000000 --- a/terrarium/bi_ci/bi_ci_tests/dummy_ext/test_placeholder.py +++ /dev/null @@ -1,2 +0,0 @@ -def test_dummy(): - pass diff --git a/terrarium/bi_ci/bi_ci_tests/dummy_fat/test_placeholder.py b/terrarium/bi_ci/bi_ci_tests/dummy_fat/test_placeholder.py deleted file mode 100644 index 10cf3ad0a..000000000 --- a/terrarium/bi_ci/bi_ci_tests/dummy_fat/test_placeholder.py +++ /dev/null @@ -1,2 +0,0 @@ -def test_dummy(): - pass diff --git a/terrarium/bi_ci/pyproject.toml b/terrarium/bi_ci/pyproject.toml index 009371996..93fab7c5e 100644 --- a/terrarium/bi_ci/pyproject.toml +++ b/terrarium/bi_ci/pyproject.toml @@ -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" @@ -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" @@ -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