Skip to content

Commit

Permalink
Merge pull request #587 from DeepRank/576_add_ipynb_testing_gcroci2
Browse files Browse the repository at this point in the history
ci: add action for testing the tutorials' notebooks
  • Loading branch information
gcroci2 authored Mar 5, 2024
2 parents 843685e + 8db7855 commit 887b129
Show file tree
Hide file tree
Showing 3 changed files with 837 additions and 770 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/notebooks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: notebooks

on:
push:
paths-ignore:
# specific folder locations
- ".vscode/**"
- "docs/**"
# filetypes
- "**.md"
- "**.rst"
- "**.cff"
- "**.png"
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
# specific folder locations
- ".vscode/**"
- "docs/**"
# filetypes
- "**.md"
- "**.rst"
- "**.cff"
- "**.png"

jobs:
build:
if: github.event.pull_request.draft == false
name: Build for (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.10"] # ["3.10", "3.11"]

# https://github.com/marketplace/actions/setup-miniconda#use-a-default-shell
defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v3

- uses: ./.github/actions/install-python-and-package
with:
python-version: ${{ matrix.python-version }}
extras-require: test, notebooks
pkg-installation-type: "repository"

- name: Download the data for the tutorials
shell: bash -l {0}
run: |
wget https://zenodo.org/records/8349335/files/data_raw.zip
unzip data_raw.zip -d data_raw
mv data_raw tutorials
- name: Run tutorial notebooks
run: pytest --nbmake tutorials
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ test = [
"coveralls",
]
publishing = ["build", "twine", "wheel"]
notebooks = ["nbmake"]

[project.urls]
Documentation = "https://deeprank2.readthedocs.io/en/latest/?badge=latest"
Expand Down
Loading

0 comments on commit 887b129

Please sign in to comment.