Merge pull request #498 from AllenInstitute/ccf_display_bug #1113
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: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: | |
| group: LargerInstance | |
| 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 swap space | |
| run: | | |
| sudo fallocate -l 10G /swapfile | |
| sudo chmod 600 /swapfile | |
| sudo mkswap /swapfile | |
| sudo swapon /swapfile | |
| free -h | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install Python build headers | |
| run: | | |
| if command -v sudo >/dev/null 2>&1; then | |
| sudo apt-get update | |
| sudo apt-get install -y g++ | |
| else | |
| apt-get update | |
| apt-get install -y g++ | |
| fi | |
| - name: Install uv | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install uv | |
| - name: Sync environment from lockfile | |
| run: | | |
| uv sync --frozen --extra dev --python 3.13 | |
| - name: Printing environment | |
| run: uv pip freeze | |
| - name: Testing Higher-Order Notebooks | |
| run: | | |
| uv run pytest --nbmake --nbmake-timeout=8000 -n=auto "./docs/higher-order" | |
| rm ./docs/higher-order/*.nwb | |
| - name: Testing Basics Notebooks | |
| run: | | |
| uv run pytest --nbmake --nbmake-timeout=100000 -n=auto "./docs/basics" | |
| rm ./docs/basics/*.nwb | |
| - name: Testing Visualization Notebooks | |
| run: | | |
| uv run pytest --nbmake --nbmake-timeout=8000 -n=auto "./docs/visualization" | |
| rm ./docs/visualization/*.nwb | |
| - name: Testing First-Order Notebooks | |
| run: | | |
| uv run pytest --nbmake --nbmake-timeout=8000 -n=auto "./docs/first-order" | |
| rm ./docs/first-order/*.nwb | |
| - name: Testing Project Notebooks | |
| run: | | |
| for nb in ./docs/projects/*.ipynb; do | |
| echo "::group::Testing $nb" | |
| uv run pytest --nbmake --nbmake-timeout=12000 -v --tb=long "$nb" | |
| rm -f ./docs/projects/*.nwb | |
| echo "::endgroup::" | |
| done | |
| - 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: Install docs JS dependencies | |
| run: npm install --prefix ./docs | |
| - name: Build MyST book | |
| working-directory: ./docs | |
| run: | | |
| uv run myst clean --all | |
| uv run myst build --html |