Documentation Building #22
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: Documentation Building | |
on: | |
pull_request: | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
schedule: | |
- cron: 0 7 * * 1 # 7 A.M. mon | |
concurrency: | |
group: docs-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
tests: | |
name: Docs Building | |
runs-on: ubuntu-latest | |
if: "!(contains(github.event.head_commit.message, '[skip ci]') || contains(github.event.head_commit.message, '[ci skip]'))" | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
cache: pip | |
cache-dependency-path: '**/pyproject.toml' | |
- name: Install base dependencies | |
run: pip install -U -q pip setuptools | |
- name: Install package dependencies | |
run: pip install -U -q .[docs] | |
- name: Build with Sphinx | |
run: | | |
cd docs | |
make html | |
doctest: | |
name: Documentation Testing | |
runs-on: ubuntu-latest | |
if: "!(contains(github.event.head_commit.message, '[skip ci]') || contains(github.event.head_commit.message, '[ci skip]'))" | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
cache: pip | |
cache-dependency-path: '**/pyproject.toml' | |
- name: Install base dependencies | |
run: pip install -U -q pip setuptools | |
- name: Install pytest | |
run: pip install -U -q pytest pytest-doctestplus | |
- name: Install package dependencies | |
run: pip install -U .[docs] .[test] | |
- name: Run pytest on docs | |
run: pytest --doctest-rst --doctest-plus docs |