From 214fbea6f6318505bc8f822d53d6e5fd2d906725 Mon Sep 17 00:00:00 2001 From: Ross Barnowski Date: Mon, 16 May 2022 23:01:52 -0700 Subject: [PATCH 1/3] Add nbval to CI. Co-authored-by: Mridul Seth --- .github/workflows/notebooks.yml | 42 +++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/notebooks.yml diff --git a/.github/workflows/notebooks.yml b/.github/workflows/notebooks.yml new file mode 100644 index 00000000..d083df38 --- /dev/null +++ b/.github/workflows/notebooks.yml @@ -0,0 +1,42 @@ +name: Test notebooks + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + max-parallel: 12 + matrix: + os: [Ubuntu-20.04, macOS-latest] + python-version: [3.8, 3.9, "3.10"] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install -r site/requirements.txt -r requirements.txt + python -m pip list + + - name: Test with nbval + run: | + python -m pip install pytest nbval + find content/ -name "*.md" -exec jupytext --to notebook {} \; + # TODO: find better way to exclude notebooks from test + rm content/tutorial-deep-reinforcement-learning-with-pong-from-pixels.ipynb + rm content/pairing.ipynb + rm content/tutorial-style-guide.ipynb + rm content/tutorial-nlp-from-scratch.ipynb + # Test notebook execution + pytest --nbval-lax --durations=10 content/ From 67162184e468dabe0235d23ed82374f99493ff30 Mon Sep 17 00:00:00 2001 From: Ross Barnowski Date: Tue, 12 Jul 2022 22:45:55 +0300 Subject: [PATCH 2/3] Try windows CI. --- .github/workflows/notebooks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/notebooks.yml b/.github/workflows/notebooks.yml index d083df38..3e5aa255 100644 --- a/.github/workflows/notebooks.yml +++ b/.github/workflows/notebooks.yml @@ -14,7 +14,7 @@ jobs: strategy: max-parallel: 12 matrix: - os: [Ubuntu-20.04, macOS-latest] + os: [Ubuntu-20.04, macOS-latest, windows-latest] python-version: [3.8, 3.9, "3.10"] steps: From 09af7e4fa13915503ca75d3de1480f245f670fba Mon Sep 17 00:00:00 2001 From: Ross Barnowski Date: Tue, 12 Jul 2022 22:54:38 +0300 Subject: [PATCH 3/3] Revert "Try windows CI." This reverts commit 67162184e468dabe0235d23ed82374f99493ff30. --- .github/workflows/notebooks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/notebooks.yml b/.github/workflows/notebooks.yml index 3e5aa255..d083df38 100644 --- a/.github/workflows/notebooks.yml +++ b/.github/workflows/notebooks.yml @@ -14,7 +14,7 @@ jobs: strategy: max-parallel: 12 matrix: - os: [Ubuntu-20.04, macOS-latest, windows-latest] + os: [Ubuntu-20.04, macOS-latest] python-version: [3.8, 3.9, "3.10"] steps: