Skip to content

scheduled-tests

scheduled-tests #964

name: scheduled-tests
on:
schedule:
# Run at the beginning of each day
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
tests-windows:
name: Run tests and build docs on Windows
runs-on: windows-latest
strategy:
matrix:
# Using the default python in the Windows 2022 github actions runner
# ref: https://github.com/actions/virtual-environments/issues/4856
python-version: [3.10]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- uses: actions/cache@v4
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
pip install --upgrade-strategy eager -e .[testing,sphinx]
- name: Run pytest
run: pytest --durations=10 -m 'not requires_chrome and not requires_tex' --jb-tempdir local_path
- name: Build the book
run: |
jb build -W -n --keep-going --builder html docs/
osx:
name: Run Tests on OS X
runs-on: macos-latest
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- uses: actions/cache@v4
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-
# Install libmagic to avoid a flaky Fonts error with matplotlib
# ref: https://stackoverflow.com/questions/62279920/python-macos-error-unable-to-revert-mtime-library-fonts
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
pip install --upgrade-strategy eager -e .[testing,sphinx]
brew install libmagic
- name: Run Pytest
run: |
pytest --durations=10 -m 'not requires_chrome and not requires_tex' --jb-tempdir local_path
- name: Build the book
run: |
jb build -W -n --keep-going --builder html docs/