Skip to content

Merge branch 'release/1.5.2' into main #985

Merge branch 'release/1.5.2' into main

Merge branch 'release/1.5.2' into main #985

Workflow file for this run

name: Docs test on push and PR
on: [push, pull_request, workflow_dispatch]
jobs:
unit-tests:
name: Run Docs Tests
strategy:
fail-fast: false
env:
OS: ubuntu-latest
PYTHON-VERSION: "3.9"
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Install Pandoc
run: sudo apt-get install pandoc
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Checkout code
uses: actions/checkout@v3
- name: Get pip cache location
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"
- name: Get date
id: date
run: >
python -c
"import datetime;
now = datetime.datetime.now();
print(f'::set-output name=text::{now.year}/{now.month}-part{1 + now.day // 8}')"
- name: Load pip cache
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: doctests-${{ runner.os }}-Python3.9-${{ steps.date.outputs.text }}-pip-${{ hashFiles('**/setup.py', './.github/workflows/unit-tests.yml') }}
- name: Install spellcheck library
run: sudo apt-get install libenchant-2-2
- name: Install package & (test) dependencies
run: python -m pip install --upgrade --upgrade-strategy=eager .[docs]
- name: Build docs
run: sphinx-build -b html docs docs/_build
- name: Run docs tests
run: sphinx-build -b doctest docs docs/_doctest
- name: Run docs spell checker
run: sphinx-build -b spelling docs docs/_spellcheck