Skip to content

Fix readthedocs poetry configuration #334

Fix readthedocs poetry configuration

Fix readthedocs poetry configuration #334

Workflow file for this run

name: Test and lint
on:
workflow_dispatch:
push:
branches: [master]
pull_request:
branches:
- "**"
env:
PYTHON_VERSION: "3.8"
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
[
"pypy-3.8",
"pypy-3.9",
"pypy-3.10",
"3.8",
"3.9",
"3.10",
"3.11",
"3.12",
"3.13-dev",
]
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"
- name: Install needed dependencies
run: |
pip install tox tox-gh-actions
- name: Run tests with tox
run: tox
lint:
runs-on: ubuntu-latest
env:
TARGETS: src tests
steps:
- uses: actions/checkout@v4
- name: Install Poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: "poetry"
- name: Install dependencies
run: |
poetry config virtualenvs.in-project true
poetry install
- name: Run isort
run: poetry run isort --check-only ${TARGETS}
- name: Run black
run: poetry run black --check ${TARGETS}
- name: Run mypy
run: poetry run mypy ${TARGETS}
- name: Run pylint
run: poetry run pylint ${TARGETS}
test-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: "poetry"
- name: Install dependencies
run: |
poetry config virtualenvs.in-project true
poetry install
- name: Generate man pages with Sphinx
run: poetry run python setup.py build_sphinx -W --keep-going -n -b man --build-dir build/sphinx
- name: Build docs with Mkdocs
run: poetry run make docs