Skip to content

Update dependencies #687

Update dependencies

Update dependencies #687

Workflow file for this run

# Copyright (C) 2020-2024 Serghei Iakovlev <gnu@serghei.pl>
#
# This file is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this file. If not, see <https://www.gnu.org/licenses/>.
name: Docs
on:
push:
branches-ignore:
# These should always correspond to pull requests, so ignore them for
# the push trigger and let them be triggered by the pull_request
# trigger, avoiding running the workflow twice. This is a minor
# optimization so there's no need to ensure this is comprehensive.
- 'dependabot/**'
pull_request:
branches:
- main
jobs:
docs:
runs-on: ubuntu-latest
name: Build and test package documentation
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 5
- name: Set up Python 3.12
id: setup-python
uses: actions/setup-python@v5.3.0
with:
python-version: '3.12'
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.4
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: docs-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
docs-${{ steps.setup-python.outputs.python-version }}-
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --only=docs --no-root
- name: Build and test package documentation
run: |
source $VENV
sphinx-build --nitpicky --show-traceback --fail-on-warning --builder html docs docs/_build/html
sphinx-build --nitpicky --show-traceback --fail-on-warning --builder doctest docs docs/_build/doctest
python -m doctest README.rst