Skip to content

Merge branch 'main' into development #990

Merge branch 'main' into development

Merge branch 'main' into development #990

Workflow file for this run

name: Docs test on push and PR
on:
push:
branches:
- main
- development
pull_request:
branches:
- main
- development
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@v4
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
shell: bash
run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Get date
id: date
shell: bash
run: >
python -c
"import datetime;
now = datetime.datetime.now();
print(f'text={now.year}/{now.month}-part{1 + now.day // 8}')" >> $GITHUB_OUTPUT
- 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