Skip to content

Commit

Permalink
[GHA] Enabled snippets tests in smart CI (openvinotoolkit#28096)
Browse files Browse the repository at this point in the history
### Details:
Addressed CI issue from
openvinotoolkit#28035

### Tickets:
 - *[159467](https://jira.devtools.intel.com/browse/CVS-159467)*
  • Loading branch information
mryzhov authored Dec 18, 2024
1 parent 250a77f commit 87370fe
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 9 deletions.
7 changes: 7 additions & 0 deletions .github/components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ Python_API:
- OVC
- tools
- TF_FE
- docs_snippets
build:
- CPU
- HETERO
Expand Down Expand Up @@ -243,6 +244,12 @@ tools:
docs:
revalidate: []
build: []

docs_snippets:
revalidate:
- docs_snippets
build:
- Python_API

licensing:
revalidate: []
Expand Down
4 changes: 3 additions & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/job_python_api_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
type: string
required: false
default: '{"image": null}'
affected-components:
description: 'Components that are affected by changes in the commit defined by the Smart CI Action'
type: string
required: true
python-version:
description: 'Python version to setup. E.g., "3.11"'
type: string
Expand All @@ -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: 30
runs-on: ${{ inputs.runner }}
container: ${{ fromJSON(inputs.container) }}
Expand Down Expand Up @@ -95,6 +100,7 @@ jobs:
#

- name: Python API Tests
if: fromJSON(inputs.affected-components).Python_API.test
run: |
# for 'template' extension
export LD_LIBRARY_PATH=${INSTALL_TEST_DIR}/tests/:$LD_LIBRARY_PATH
Expand All @@ -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.test
run: |
python3 -m pip uninstall -y numpy
python3 -m pip install "numpy~=1.26.0"
Expand All @@ -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.0
timeout-minutes: 15
with:
Expand All @@ -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, onnx
python3 -m pip install -r ${INSTALL_TEST_DIR}/tests/python/preprocess/torchvision/requirements.txt -r ${INSTALL_TEST_DIR}/tests/requirements_onnx
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.test

TensorFlow_Layer_Tests:
name: TensorFlow Layer Tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.test

Python_Unit_Tests:
name: Python unit tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mac_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.test

TensorFlow_Layer_Tests:
name: TensorFlow Layer Tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manylinux_2014.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.test

Overall_Status:
name: ci/gha_overall_status_manylinux2014
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu_22.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.test

TensorFlow_Layer_Tests:
name: TensorFlow Layer Tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu_24.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.test

Pytorch_Layer_Tests:
name: Pytorch Layer Tests
Expand Down

0 comments on commit 87370fe

Please sign in to comment.