Dev #957
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" , "dev"] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: | |
group: LargerInstance | |
container: | |
image: rcpeene/openscope_databook:latest | |
env: | |
DANDI_API_KEY: ${{ secrets.DANDI_API_KEY }} | |
TESTING: True | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.ref }} | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10.11' | |
# - name: Upgrading pip | |
# run: pip install --upgrade pip | |
# - name: Install deps | |
# run: pip install cython numpy==1.26 | |
- name: Installing package | |
run: pip install -e . | |
# Some git-based dependencies (e.g., ophys-nway-matching) in requirements.txt | |
# are not reliably installed via `pip install -e .` due to setuptools limitations. | |
# This second install ensures all such dependencies are properly installed. | |
- name: Installing packages again (to avoid setuptools limitations) | |
run: pip install -r requirements.txt | |
- name: Installing build dependencies | |
run: | | |
pip install markupsafe==2.0.1 | |
pip install jupyter==1.0.0 | |
pip install -U jupyter-book==1.0.0 | |
pip install nbmake==1.5.3 | |
pip install pytest-xdist==3.5.0 | |
- name: Printing environment | |
run: pip freeze | |
- name: Testing Embargoed Notebooks | |
run: | | |
pytest --nbmake --nbmake-timeout=8000 -n=auto "./docs/embargoed" | |
rm ./docs/embargoed/*.nwb | |
- name: Testing Higher-Order Notebooks | |
run: | | |
pytest --nbmake --nbmake-timeout=8000 -n=auto "./docs/higher-order" --ignore docs/higher-order/behavioral_state.ipynb | |
rm ./docs/higher-order/*.nwb | |
- name: Testing Basics Notebooks | |
run: | | |
pytest --nbmake --nbmake-timeout=100000 -n=auto "./docs/basics" | |
rm ./docs/basics/*.nwb | |
- name: Testing Visualization Notebooks | |
run: | | |
pytest --nbmake --nbmake-timeout=8000 -n=auto "./docs/visualization" | |
rm ./docs/visualization/*.nwb | |
- name: Testing First-Order Notebooks | |
run: | | |
pytest --nbmake --nbmake-timeout=8000 -n=auto "./docs/first-order" | |
rm ./docs/first-order/*.nwb | |
- name: Testing Project Notebooks | |
run: | | |
pytest --nbmake --nbmake-timeout=8000 -n=auto "./docs/projects" | |
rm ./docs/projects/*.nwb | |
- name: Printing log | |
run: | | |
git config --global --add safe.directory /__w/openscope_databook/openscope_databook | |
git status | |
- name: Printing shortlog | |
run: git log | git shortlog -sn | |
- name: Build Jupyter book | |
run: | | |
jupyter-book clean ./docs | |
jupyter-book build ./docs |