OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[GHA] Enabled snippets tests in smart CI (#28096)
Mikhail Ryzhov87370fe77238
diff --git a/.github/components.yml b/.github/components.ymlindex 74247e1f051..31952e2b87c 100644--- a/.github/components.yml+++ b/.github/components.yml@@ -175,6 +175,7 @@ Python_API:- OVC- tools- TF_FE+ - docs_snippetsbuild:- CPU- HETERO@@ -243,6 +244,12 @@ tools:docs:revalidate: []build: []++docs_snippets:+ revalidate:+ - docs_snippets+ build:+ - Python_APIlicensing:revalidate: []diff --git a/.github/labeler.yml b/.github/labeler.ymlindex e9b2acb26c9..cb05d3dea36 100644--- a/.github/labeler.yml+++ b/.github/labeler.yml@@ -57,10 +57,12 @@'category: docs':- '**/*.md'- any: ['docs/**/*',- '!docs/snippets/**/*']+ '!docs/snippets/**/*',+ '!docs/articles_en/assets/snippets/**/*']'category: docs_snippets':- 'docs/snippets/**/*'+- 'docs/articles_en/assets/snippets/**/*''category: extensions':- 'src/core/include/openvino/core/extension.hpp'diff --git a/.github/workflows/job_python_api_tests.yml b/.github/workflows/job_python_api_tests.ymlindex 81092db2bb8..e12001cd67a 100644--- a/.github/workflows/job_python_api_tests.yml+++ b/.github/workflows/job_python_api_tests.yml@@ -12,6 +12,10 @@ on:type: stringrequired: falsedefault: '{"image": null}'+ affected-components:+ description: 'Components that are affected by changes in the commit defined by the Smart CI Action'+ type: string+ required: truepython-version:description: 'Python version to setup. E.g., "3.11"'type: string@@ -25,6 +29,7 @@ env:jobs:Python_Unit_Tests:name: Python API tests+ if: ${{ fromJSON(inputs.affected-components).Python_API.test || fromJSON(inputs.affected-components).docs_snippets.test }}timeout-minutes: 30runs-on: ${{ inputs.runner }}container: ${{ fromJSON(inputs.container) }}@@ -95,6 +100,7 @@ jobs:#- name: Python API Tests+ if: fromJSON(inputs.affected-components).Python_API.testrun: |# for 'template' extensionexport LD_LIBRARY_PATH=${INSTALL_TEST_DIR}/tests/:$LD_LIBRARY_PATH@@ -103,6 +109,7 @@ jobs:--ignore=${INSTALL_TEST_DIR}/tests/pyopenvino/tests/test_utils/test_utils.py- name: Python API Tests -- numpy<2.0.0+ if: fromJSON(inputs.affected-components).Python_API.testrun: |python3 -m pip uninstall -y numpypython3 -m pip install "numpy~=1.26.0"@@ -114,7 +121,7 @@ jobs:--ignore=${INSTALL_TEST_DIR}/tests/pyopenvino/tests/test_utils/test_utils.py- name: Clone API snippets- if: runner.os != 'macOS'+ if: ${{ runner.os != 'macOS' && fromJSON(inputs.affected-components).docs_snippets.test }}uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0timeout-minutes: 15with:@@ -123,7 +130,7 @@ jobs:submodules: 'false'- name: Docs Python snippets- if: runner.os != 'macOS'+ if: ${{ runner.os != 'macOS' && fromJSON(inputs.affected-components).docs_snippets.test }}run: |# torch, onnxpython3 -m pip install -r ${INSTALL_TEST_DIR}/tests/python/preprocess/torchvision/requirements.txt -r ${INSTALL_TEST_DIR}/tests/requirements_onnxdiff --git a/.github/workflows/linux_arm64.yml b/.github/workflows/linux_arm64.ymlindex 9ca6c5461a6..66e825e5d5e 100644--- a/.github/workflows/linux_arm64.yml+++ b/.github/workflows/linux_arm64.yml@@ -179,8 +179,8 @@ jobs:with:runner: 'aks-linux-16-cores-arm'container: '{"image": "${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_20_04_arm64 }}", "volumes": ["/mount:/mount"]}'+ affected-components: ${{ needs.smart_ci.outputs.affected_components }}python-version: '3.11'- if: fromJSON(needs.smart_ci.outputs.affected_components).Python_API.testTensorFlow_Layer_Tests:name: TensorFlow Layer Testsdiff --git a/.github/workflows/mac.yml b/.github/workflows/mac.ymlindex 94460a2721b..5e4335b8151 100644--- a/.github/workflows/mac.yml+++ b/.github/workflows/mac.yml@@ -326,8 +326,8 @@ jobs:python-version: [ '3.9', '3.10', '3.11', '3.12' ]with:runner: 'macos-13'+ affected-components: ${{ needs.smart_ci.outputs.affected_components }}python-version: ${{ matrix.python-version }}- if: fromJSON(needs.smart_ci.outputs.affected_components).Python_API.testPython_Unit_Tests:name: Python unit testsdiff --git a/.github/workflows/mac_arm64.yml b/.github/workflows/mac_arm64.ymlindex 3340ce62e01..855d76973cc 100644--- a/.github/workflows/mac_arm64.yml+++ b/.github/workflows/mac_arm64.yml@@ -334,8 +334,8 @@ jobs:python-version: [ '3.9', '3.10', '3.11', '3.12' ]with:runner: 'macos-13-xlarge'+ affected-components: ${{ needs.smart_ci.outputs.affected_components }}python-version: ${{ matrix.python-version }}- if: fromJSON(needs.smart_ci.outputs.affected_components).Python_API.testTensorFlow_Layer_Tests:name: TensorFlow Layer Testsdiff --git a/.github/workflows/manylinux_2014.yml b/.github/workflows/manylinux_2014.ymlindex 4b5fc137c15..d6b3daa12ab 100644--- a/.github/workflows/manylinux_2014.yml+++ b/.github/workflows/manylinux_2014.yml@@ -266,8 +266,8 @@ jobs:with:runner: 'aks-linux-4-cores-16gb'container: '{"image": "${{ matrix.image }}", "volumes": ["/mount:/mount"]}'+ affected-components: ${{ needs.smart_ci.outputs.affected_components }}python-version: ${{ matrix.python-version }}- if: fromJSON(needs.smart_ci.outputs.affected_components).Python_API.testOverall_Status:name: ci/gha_overall_status_manylinux2014diff --git a/.github/workflows/ubuntu_22.yml b/.github/workflows/ubuntu_22.ymlindex d749164abbe..5aed74bbb24 100644--- a/.github/workflows/ubuntu_22.yml+++ b/.github/workflows/ubuntu_22.yml@@ -311,8 +311,8 @@ jobs:with:runner: 'aks-linux-4-cores-16gb'container: '{"image": "${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_22_04_x64 }}", "volumes": ["/mount:/mount"]}'+ affected-components: ${{ needs.smart_ci.outputs.affected_components }}python-version: '3.11'- if: fromJSON(needs.smart_ci.outputs.affected_components).Python_API.testTensorFlow_Layer_Tests:name: TensorFlow Layer Testsdiff --git a/.github/workflows/ubuntu_24.yml b/.github/workflows/ubuntu_24.ymlindex 2c76149ecdc..25be095e692 100644--- a/.github/workflows/ubuntu_24.yml+++ b/.github/workflows/ubuntu_24.yml@@ -143,8 +143,8 @@ jobs:with:runner: 'aks-linux-4-cores-16gb'container: '{"image": "${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_24_04_x64 }}", "volumes": ["/mount:/mount"]}'+ affected-components: ${{ needs.smart_ci.outputs.affected_components }}python-version: '3.12'- if: fromJSON(needs.smart_ci.outputs.affected_components).Python_API.testPytorch_Layer_Tests:name: Pytorch Layer Tests