Fix manifest. #244
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: Python package | |
on: | |
push: | |
branches: [ develop ] | |
pull_request: | |
branches: [ develop ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.8', '3.9', '3.10', '3.11'] | |
pip-sphinx: ['sphinx'] | |
pytest-options: [''] | |
include: | |
# python 3.7 (needs older docutils and jinja2) | |
- python-version: '3.7' | |
pip-sphinx: '"docutils<0.18" "jinja2<3.1"' | |
pytest-options: '' | |
# numpydoc tests | |
- python-version: '3.11' | |
pip-sphinx: 'sphinx numpydoc' | |
pytest-options: '-m "numpydoc"' | |
# rinohtype tests | |
- python-version: '3.11' | |
pip-sphinx: 'sphinx https://github.com/brechtm/rinohtype/archive/refs/heads/master.zip' | |
pytest-options: '-m "rinohtype"' | |
# cython tests | |
- python-version: '3.11' | |
pip-sphinx: 'sphinx test/some_cython_module' | |
pytest-options: '-m "cython"' | |
# latest of sphinx 3.x series (released for Python 3.9) | |
- python-version: '3.9' | |
pip-sphinx: '"sphinx<4" "jinja2<3.1"' | |
pytest-options: '' | |
# latest of sphinx 4.x series (released for Python 3.10) | |
- python-version: '3.10' | |
pip-sphinx: '"sphinx<5"' | |
pytest-options: '' | |
# latest of sphinx 5.x series | |
- python-version: '3.11' | |
pip-sphinx: '"sphinx<6"' | |
pytest-options: '' | |
# latest of sphinx 6.x series | |
- python-version: '3.11' | |
pip-sphinx: '"sphinx<7"' | |
pytest-options: '' | |
# sphinx pre-release | |
- python-version: '3.11' | |
pip-sphinx: '--pre sphinx' | |
pytest-options: '' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install pytest codecov coverage | |
python -m pip install . ${{ matrix.pip-sphinx }} | |
- name: Install extra dependencies | |
run: | | |
python -m pip install flake8 check-manifest mypy types-setuptools types-docutils | |
if: matrix.pip-sphinx == 'sphinx' && matrix.python-version == '3.11' | |
- name: Check manifest | |
run: | | |
check-manifest | |
if: matrix.pip-sphinx == 'sphinx' && matrix.python-version == '3.11' | |
- name: Lint with flake8 | |
run: | | |
flake8 . --count --select=E9,F63,F7,F82 --show-source | |
flake8 . --count --max-complexity=10 | |
if: matrix.pip-sphinx == 'sphinx' && matrix.python-version == '3.11' | |
- name: Type checking with mypy | |
run: mypy | |
if: matrix.pip-sphinx == 'sphinx' && matrix.python-version == '3.11' | |
- name: Documentation | |
run: | | |
pushd doc && make html && popd | |
if: matrix.pip-sphinx == 'sphinx' && matrix.python-version == '3.11' | |
- name: Test with pytest | |
run: | | |
coverage run -m pytest ${{ matrix.pytest-options }} | |
codecov |