Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dedicated GHA flow for terrarium packages #87

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading