Skip to content

Commit 87370fe

Browse files
authored
[GHA] Enabled snippets tests in smart CI (openvinotoolkit#28096)
### Details: Addressed CI issue from openvinotoolkit#28035 ### Tickets: - *[159467](https://jira.devtools.intel.com/browse/CVS-159467)*
1 parent 250a77f commit 87370fe

9 files changed

+25
-9
lines changed

.github/components.yml

+7
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ Python_API:
175175
- OVC
176176
- tools
177177
- TF_FE
178+
- docs_snippets
178179
build:
179180
- CPU
180181
- HETERO
@@ -243,6 +244,12 @@ tools:
243244
docs:
244245
revalidate: []
245246
build: []
247+
248+
docs_snippets:
249+
revalidate:
250+
- docs_snippets
251+
build:
252+
- Python_API
246253

247254
licensing:
248255
revalidate: []

.github/labeler.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,12 @@
5757
'category: docs':
5858
- '**/*.md'
5959
- any: ['docs/**/*',
60-
'!docs/snippets/**/*']
60+
'!docs/snippets/**/*',
61+
'!docs/articles_en/assets/snippets/**/*']
6162

6263
'category: docs_snippets':
6364
- 'docs/snippets/**/*'
65+
- 'docs/articles_en/assets/snippets/**/*'
6466

6567
'category: extensions':
6668
- 'src/core/include/openvino/core/extension.hpp'

.github/workflows/job_python_api_tests.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
type: string
1313
required: false
1414
default: '{"image": null}'
15+
affected-components:
16+
description: 'Components that are affected by changes in the commit defined by the Smart CI Action'
17+
type: string
18+
required: true
1519
python-version:
1620
description: 'Python version to setup. E.g., "3.11"'
1721
type: string
@@ -25,6 +29,7 @@ env:
2529
jobs:
2630
Python_Unit_Tests:
2731
name: Python API tests
32+
if: ${{ fromJSON(inputs.affected-components).Python_API.test || fromJSON(inputs.affected-components).docs_snippets.test }}
2833
timeout-minutes: 30
2934
runs-on: ${{ inputs.runner }}
3035
container: ${{ fromJSON(inputs.container) }}
@@ -95,6 +100,7 @@ jobs:
95100
#
96101

97102
- name: Python API Tests
103+
if: fromJSON(inputs.affected-components).Python_API.test
98104
run: |
99105
# for 'template' extension
100106
export LD_LIBRARY_PATH=${INSTALL_TEST_DIR}/tests/:$LD_LIBRARY_PATH
@@ -103,6 +109,7 @@ jobs:
103109
--ignore=${INSTALL_TEST_DIR}/tests/pyopenvino/tests/test_utils/test_utils.py
104110
105111
- name: Python API Tests -- numpy<2.0.0
112+
if: fromJSON(inputs.affected-components).Python_API.test
106113
run: |
107114
python3 -m pip uninstall -y numpy
108115
python3 -m pip install "numpy~=1.26.0"
@@ -114,7 +121,7 @@ jobs:
114121
--ignore=${INSTALL_TEST_DIR}/tests/pyopenvino/tests/test_utils/test_utils.py
115122
116123
- name: Clone API snippets
117-
if: runner.os != 'macOS'
124+
if: ${{ runner.os != 'macOS' && fromJSON(inputs.affected-components).docs_snippets.test }}
118125
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
119126
timeout-minutes: 15
120127
with:
@@ -123,7 +130,7 @@ jobs:
123130
submodules: 'false'
124131

125132
- name: Docs Python snippets
126-
if: runner.os != 'macOS'
133+
if: ${{ runner.os != 'macOS' && fromJSON(inputs.affected-components).docs_snippets.test }}
127134
run: |
128135
# torch, onnx
129136
python3 -m pip install -r ${INSTALL_TEST_DIR}/tests/python/preprocess/torchvision/requirements.txt -r ${INSTALL_TEST_DIR}/tests/requirements_onnx

.github/workflows/linux_arm64.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ jobs:
179179
with:
180180
runner: 'aks-linux-16-cores-arm'
181181
container: '{"image": "${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_20_04_arm64 }}", "volumes": ["/mount:/mount"]}'
182+
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
182183
python-version: '3.11'
183-
if: fromJSON(needs.smart_ci.outputs.affected_components).Python_API.test
184184

185185
TensorFlow_Layer_Tests:
186186
name: TensorFlow Layer Tests

.github/workflows/mac.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,8 @@ jobs:
326326
python-version: [ '3.9', '3.10', '3.11', '3.12' ]
327327
with:
328328
runner: 'macos-13'
329+
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
329330
python-version: ${{ matrix.python-version }}
330-
if: fromJSON(needs.smart_ci.outputs.affected_components).Python_API.test
331331

332332
Python_Unit_Tests:
333333
name: Python unit tests

.github/workflows/mac_arm64.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,8 @@ jobs:
334334
python-version: [ '3.9', '3.10', '3.11', '3.12' ]
335335
with:
336336
runner: 'macos-13-xlarge'
337+
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
337338
python-version: ${{ matrix.python-version }}
338-
if: fromJSON(needs.smart_ci.outputs.affected_components).Python_API.test
339339

340340
TensorFlow_Layer_Tests:
341341
name: TensorFlow Layer Tests

.github/workflows/manylinux_2014.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,8 @@ jobs:
266266
with:
267267
runner: 'aks-linux-4-cores-16gb'
268268
container: '{"image": "${{ matrix.image }}", "volumes": ["/mount:/mount"]}'
269+
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
269270
python-version: ${{ matrix.python-version }}
270-
if: fromJSON(needs.smart_ci.outputs.affected_components).Python_API.test
271271

272272
Overall_Status:
273273
name: ci/gha_overall_status_manylinux2014

.github/workflows/ubuntu_22.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,8 @@ jobs:
311311
with:
312312
runner: 'aks-linux-4-cores-16gb'
313313
container: '{"image": "${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_22_04_x64 }}", "volumes": ["/mount:/mount"]}'
314+
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
314315
python-version: '3.11'
315-
if: fromJSON(needs.smart_ci.outputs.affected_components).Python_API.test
316316

317317
TensorFlow_Layer_Tests:
318318
name: TensorFlow Layer Tests

.github/workflows/ubuntu_24.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ jobs:
143143
with:
144144
runner: 'aks-linux-4-cores-16gb'
145145
container: '{"image": "${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_24_04_x64 }}", "volumes": ["/mount:/mount"]}'
146+
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
146147
python-version: '3.12'
147-
if: fromJSON(needs.smart_ci.outputs.affected_components).Python_API.test
148148

149149
Pytorch_Layer_Tests:
150150
name: Pytorch Layer Tests

0 commit comments

Comments
 (0)