Skip to content

revert

revert #107

name: jupyter-matrix
on: push
jobs:
list-notebooks:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- id: set-matrix
run: echo "::set-output name=matrix::$(ls tutorials/**/*.ipynb | jq -R -s -c 'split("\n")[:-1]')"
notebook:
needs: list-notebooks
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
manifest: ${{ fromJson(needs.list-notebooks.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Setup FFmpeg
uses: FedericoCarboni/setup-ffmpeg@v3
- name: Setup TeX Live
uses: teatimeguest/setup-texlive-action@v3
with:
packages: scheme-full
- name: Install Python dependencies
run: |
pip install -r requirements.txt
pip install -r requirements_dev.txt
- name: Build notebook
run: |
jupyter nbconvert --to notebook --inplace --execute --allow-errors "${{ matrix.manifest }}"
TOTAL_ERRORS=0
grep -q '"output_type": "error"' "${{ matrix.manifest }}" && echo "Found errors in ${{ matrix.manifest }}" && TOTAL_ERRORS=1 && printf '%b\n' | jq -r '.cells[].outputs[]?.traceback[]?' "${{ matrix.manifest }}"
exit $TOTAL_ERRORS