Skip to content

[pre-commit.ci] pre-commit autoupdate #341

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #341

Workflow file for this run

name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
pytest-and-notebooks:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest] #, macos-latest]
python-version: ["3.10", "3.9"]
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: "${{ github.workflow }} - ${{ matrix.python-version}} - ${{ matrix.os }} @ ${{ github.ref }}"
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "**/pyproject.toml"
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install ".[tests,all,da]"
pip install -r ./tests/requirements.txt
- name: Run and write pytest
shell: bash
run: |
pytest
- name: Install dependencies for notebooks
shell: bash
run: |
# Assumes the package have the tutorials extra
pip install ".[tutorials]"
- name: Convert and run notebooks
shell: bash
run: |
jupyter nbconvert --to python ./docs/tutorials/*.ipynb
for f in docs/tutorials/*.py; do python "$f"; done