From 9011633deabdcfa6f1bf8cbdf0f69a8cc1c91068 Mon Sep 17 00:00:00 2001 From: Chang She <759245+changhiskhan@users.noreply.github.com> Date: Tue, 27 Sep 2022 14:49:51 -0700 Subject: [PATCH] run quickstart notebook on every commit --- .github/workflows/notebook.yml | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/notebook.yml diff --git a/.github/workflows/notebook.yml b/.github/workflows/notebook.yml new file mode 100644 index 0000000000..861bd02706 --- /dev/null +++ b/.github/workflows/notebook.yml @@ -0,0 +1,36 @@ +name: Run notebook + +on: + push: + branches: + - main + pull_request: + +jobs: + linux: + timeout-minutes: 30 + runs-on: "ubuntu-22.04" + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + lfs: true + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - uses: ./.github/workflows/build_linux_wheel + with: + python-minor-version: "10" + - name: Pip install + working-directory: python + shell: bash + run: | + pip3 install torch torchvision --extra-index-url https://download.pytorch.org/whl/cpu + pip3 install jupyter + pip3 install $(ls wheels/pylance-*-cp3${{ inputs.python-minor-version}}*.whl)[test] + - name: Run python tests + shell: bash + working-directory: python/notebooks + run: | + jupyter nbconvert --to notebook --execute quickstart.ipynb \ No newline at end of file