From 0aa8453fbbfcf3947a9c7c62b9c047b10b1ec328 Mon Sep 17 00:00:00 2001 From: Marlon Saglia Date: Tue, 20 Aug 2024 09:05:02 +0200 Subject: [PATCH] feat: add workflow to verify notebooks --- .github/workflows/verify-notebooks.yml | 42 ++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/verify-notebooks.yml diff --git a/.github/workflows/verify-notebooks.yml b/.github/workflows/verify-notebooks.yml new file mode 100644 index 000000000..354d8fb77 --- /dev/null +++ b/.github/workflows/verify-notebooks.yml @@ -0,0 +1,42 @@ +name: Verify Notebooks + +on: + push: + branches: + - master + paths: + - ".github/workflows/verify-notebooks.yml" + - "examples/model-deployment/" + - "text-image-search/" + pull_request: + branches: + - master + paths: + - ".github/workflows/verify-notebooks.yml" + - "examples/model-deployment/" + - "text-image-search/" + +defaults: + run: + # Specify to ensure "pipefail and errexit" are set. + # Ref: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#defaultsrunshell + shell: bash + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + cache: "pip" + + - name: Install dependencies + run: | + python -m pip install --upgrade -qqq pytest notebook nbconvert runnb pandas torch numpy scikit-learn + + - name: Run Notebooks + working-directory: examples/model-deployment + run: | + runnb --allow-not-trusted ONNXModelExport.ipynb