Added requirements to defect detection #132
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: Sanity check (notebooks) | |
on: | |
schedule: | |
- cron: "0 2 * * *" | |
pull_request: | |
branches: [master] | |
push: | |
branches: [master] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
find-subprojects: | |
runs-on: ubuntu-latest | |
outputs: | |
notebook: ${{ steps.categorize-subprojects.outputs.notebook }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Determine subprojects to test | |
id: find-updates | |
uses: ./.github/reusable-steps/find-updates | |
with: | |
dir: notebooks | |
ci_config_file: sanity-check-notebooks.yml | |
- name: Categorize subprojects | |
id: categorize-subprojects | |
uses: ./.github/reusable-steps/categorize-projects | |
with: | |
subprojects: ${{ steps.find-updates.outputs.subproject_dirs }} | |
notebook: | |
needs: find-subprojects | |
if: ${{ needs.find-subprojects.outputs.notebook != '[]' }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# onnxruntime-openvino is not available on mac and python<3.10 | |
os: [ubuntu-latest, windows-latest] | |
python: ["3.11", "3.12"] | |
subproject: ${{ fromJson(needs.find-subprojects.outputs.notebook) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- uses: ./.github/reusable-steps/setup-python | |
with: | |
python: ${{ matrix.python }} | |
project: ${{ matrix.subproject }} | |
- name: Use downloaded video as a stream | |
shell: bash | |
run: | | |
cd ${{ matrix.subproject }} | |
# replace video_path with sample_video.mp4 | |
find . -name "*.ipynb" -exec sed -E -i "s/video_path\s*=\s*(['\"]?.*?['\"]?)/video_path=\\\\\"sample_video.mp4\\\\\"\\\n\",/g" {} + | |
- uses: ./.github/reusable-steps/timeouted-action | |
name: Run Notebook | |
with: | |
command: jupyter nbconvert --to notebook --execute *.ipynb | |
project: ${{ matrix.subproject }} |