Skip to content

Commit

Permalink
Merge pull request #2 from openvinotoolkit/linux_tests
Browse files Browse the repository at this point in the history
[CI] added Linux tests
  • Loading branch information
mryzhov authored Feb 6, 2024
2 parents e38c1f5 + 5ffbc93 commit 56b4f06
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 1 deletion.
70 changes: 69 additions & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,4 +217,72 @@ jobs:
with:
name: openvino_tokenizers_wheel
path: ${{ env.BUILD_DIR }}/*.whl
if-no-files-found: 'error'
if-no-files-found: 'error'

openvino_tokenizers_tests:
name: OpenVINO tokenizers tests
needs: [ openvino_tokenizers ]
timeout-minutes: 25
defaults:
run:
shell: bash
runs-on: ubuntu-20.04

env:
OPENVINO_REPO: ${{ github.workspace }}/openvino
INSTALL_DIR: ${{ github.workspace }}/openvino/install
OPENVINO_TOKENIZERS_REPO: ${{ github.workspace }}/openvino_tokenizers
BUILD_DIR: ${{ github.workspace }}/openvino_tokenizers/build

steps:
- name: Clone Openvino tokenizers tests
uses: actions/checkout@v4
with:
path: ${{ env.OPENVINO_TOKENIZERS_REPO }}
sparse-checkout: |
tests
- name: Setup Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip'

- name: Download tokenizers package
uses: actions/download-artifact@v3
with:
name: openvino_tokenizers_wheel
path: ${{ env.INSTALL_DIR }}/ov_tokenizers

- name: Download OpenVINO package
uses: actions/download-artifact@v3
with:
name: openvino_package
path: ${{ env.INSTALL_DIR }}

- name: Extract OpenVINO packages
run: |
pushd ${INSTALL_DIR}
tar -xzf openvino_package.tar.gz -C ${INSTALL_DIR}
popd
- name: Install OpenVINO Python wheel
run: |
# Find and install wheel
pushd ${INSTALL_DIR}/tools
wheel_name=$(find . -name 'openvino-*.whl')
python3 -m pip install $wheel_name
popd
- name: Install OpenVINO tokenizers wheel
run: |
# Find and install wheel
pushd ${INSTALL_DIR}/ov_tokenizers
wheel_name=$(find . -name 'openvino_tokenizers*.whl')
python3 -m pip install $wheel_name[all]
popd
- name: Tokenizers regression tests
run: |
python3 -m pytest tokenizers_test.py
working-directory: ${{ env.OPENVINO_TOKENIZERS_REPO }}/tests
4 changes: 4 additions & 0 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
torch
onnx
tensorboard
pytest

0 comments on commit 56b4f06

Please sign in to comment.