Higher splitting for Github Actions and Cache venv #6981
Workflow file for this run
This file contains 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: Notebook tests | |
on: | |
push: | |
branches: | |
- master | |
- dev | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
notebook_tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.10'] | |
group: [1, 2] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Activate virtual environment | |
run: | | |
source .venv-${{ matrix.python-version }}/bin/activate | |
- name: Test notebooks with pytest and nbmake | |
run: | | |
pwd | |
lscpu | |
export PYTHONPATH=$(pwd) | |
pytest -v --nbmake "./docs/notebooks" \ | |
--nbmake-timeout=2000 \ | |
--ignore=./docs/notebooks/zernike_eval.ipynb \ | |
--splits 2 \ | |
--group ${{ matrix.group }} \ |