Clean and clear CI #329
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: OpenVINO - Notebooks Test | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "14 3 * * 1" # run weekly: every Monday at 3:14 | |
push: | |
paths: | |
- ".github/workflows/test_openvino_notebooks.yml" | |
- "notebooks/openvino/*" | |
pull_request: | |
paths: | |
- ".github/workflows/test_openvino_notebooks.yml" | |
- "notebooks/openvino/*" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9", "3.12"] | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
# ffmpeg is required for image classification and audio classification pipelines | |
sudo apt-get install ffmpeg | |
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu | |
pip install -r notebooks/openvino/requirements.txt | |
pip install .[tests,openvino] nbval | |
- name: Test with Pytest | |
run: | | |
sed -i 's/NUM_TRAIN_ITEMS = 600/NUM_TRAIN_ITEMS = 10/' notebooks/openvino/question_answering_quantization.ipynb | |
sed -i 's/# %pip install/%pip install/' notebooks/openvino/optimum_openvino_inference.ipynb | |
python -m pytest --nbval-lax notebooks/openvino/optimum_openvino_inference.ipynb notebooks/openvino/question_answering_quantization.ipynb |