Files
openvino/.github/workflows/mo.yml
Alina Kladieva 5a0dea4a46 Cherry-pick U22 adoption in github actions (#12550) (#12697)
* Cherry-pick U22 adoption in github actions

* More fixes for shellcheck

* More fixes for shellcheck

* Update .github/workflows/py_checks.yml

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2022-08-23 01:50:29 +04:00

66 lines
1.8 KiB
YAML

name: MO
on:
push:
paths:
- 'openvino/tools/mo/**'
pull_request:
paths:
- 'openvino/tools/mo/**'
jobs:
Pylint-UT:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: 3.6
- name: Cache pip
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('openvino/tools/mo/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
# tensorflow 1.15 causes modules import
# errors, most likely due to https://github.com/PyCQA/pylint/issues/2603
# for tensorflow.core.framework and tensorflow.contrib
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
# For UT
pip install unittest-xml-reporting==3.0.2
# MO requirements
pip install -r requirements.txt
pip install -r requirements_dev.txt
# requrements for CMake
sudo apt update
sudo apt --assume-yes install libusb-1.0-0-dev
working-directory: openvino/tools/mo
- name: Pylint
run: pylint -d C,R,W openvino/tools/mo/ openvino/tools/mo/mo.py
working-directory: openvino/tools/mo
- name: CMake
run: |
mkdir build
cd build
cmake ..
- name: UT
run: |
export PYTHONPATH=$PYTHONPATH:`pwd`
export MO_ROOT=`pwd`
env
mkdir ../mo-ut-logs
python3 -m xmlrunner discover -p *_test.py --output=../mo-ut-logs
working-directory: openvino/tools/mo