Clean up GitHub Actions workflows (#883) #916
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: unit tests | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.7', '3.8', '3.9', '3.10'] | |
sphinx-version: | |
- '4.0.3' | |
- '4.1.2' | |
- '4.2.0' | |
- '4.3.2' | |
- '4.5.0' | |
- '5.0.2' | |
- '5.1.1' | |
- '5.3.0' | |
- '6.1.3' | |
- git+https://github.com/sphinx-doc/sphinx.git@master | |
exclude: | |
# avoid bug in following configurations | |
# sphinx/util/typing.py:37: in <module> | |
# from types import Union as types_Union | |
# ImportError: cannot import name 'Union' from 'types' | |
- python-version: '3.10' | |
sphinx-version: '4.0.3' | |
- python-version: '3.10' | |
sphinx-version: '4.1.2' | |
# Sphinx has removed support for Python 3.7, Breathe will follow. | |
- python-version: '3.7' | |
sphinx-version: git+https://github.com/sphinx-doc/sphinx.git@master | |
- python-version: '3.7' | |
sphinx-version: '6.1.3' | |
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 sphinx from PyPI or from git | |
run: | | |
if echo "${{ matrix.sphinx-version }}"|grep -q git; then | |
pip install ${{ matrix.sphinx-version }} | |
else | |
pip install -Iv Sphinx==${{ matrix.sphinx-version }} | |
fi | |
- name: install dependencies | |
run: | | |
pip install ".[test]" | |
- name: run the unit tests | |
run: make dev-test |