From 5286cbeedf2d144b907f601db370511ae004c614 Mon Sep 17 00:00:00 2001 From: Jake <37048747+Jacob-Stevens-Haas@users.noreply.github.com> Date: Mon, 5 Feb 2024 13:39:45 +0000 Subject: [PATCH] CI: Add notebook dependencies and run --- .github/workflows/notebooks.yml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/notebooks.yml b/.github/workflows/notebooks.yml index e49cfa075..c9904cf54 100644 --- a/.github/workflows/notebooks.yml +++ b/.github/workflows/notebooks.yml @@ -22,8 +22,13 @@ jobs: path: "examples" ext: ".ipynb" - setup-python: + run-notebooks: + needs: find-notebooks runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + files: ${{ fromJson(needs.find-notebooks.outputs.paths) }} steps: - uses: actions/checkout@v3 - name: Set up Python @@ -32,16 +37,7 @@ jobs: python-version: "3.9" - name: Install dependencies run: | - pip install .[cvxpy,miosr] sympy - - run-notebooks: - needs: [find-notebooks,setup-python] - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - files: ${{ fromJson(needs.find-notebooks.outputs.paths) }} - steps: - - name: output results + pip install .[cvxpy,miosr] sympy nbconvert jupyter + - name: Run Notebook run: | - echo ${{ matrix.files }} + jupyter nbconvert --execute --to notebook --inplace ${{ matrix.files }}