Enable testing with Sphinx 7.2+ (also on Python 3.12) #42
Workflow file for this run
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: Coverage | |
on: [push, pull_request, workflow_dispatch] | |
permissions: | |
contents: read | |
jobs: | |
test-under-coverage: | |
runs-on: ubuntu-latest | |
name: ${{ matrix.name }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: "Coverage (Sphinx ~=5)" # jQuery deprecated | |
sphinx: "sphinx>=5.0.0a0,<6" | |
- name: "Coverage (Sphinx >=6)" # jQuery removed | |
sphinx: "sphinx>=6.0.0a0" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3" | |
cache: pip | |
cache-dependency-path: .github/workflows/coverage.yml | |
- name: Update pip | |
run: python -m pip install -U pip | |
- name: Install dependencies | |
run: python -m pip install -U pytest coverage[toml] "${{ matrix.sphinx }}" | |
- name: Install sphinxcontrib-jquery | |
run: python -m pip install . | |
- name: Run pytest | |
run: coverage run --parallel -m pytest -vv | |
- name: Upload coverage data | |
uses: actions/upload-artifact@v3 | |
with: | |
name: coverage-reports | |
path: .coverage.* | |
if-no-files-found: ignore | |
coverage: | |
name: Report coverage | |
runs-on: ubuntu-latest | |
needs: test-under-coverage | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3" | |
cache: pip | |
cache-dependency-path: .github/workflows/coverage.yml | |
- name: Update pip | |
run: python -m pip install -U pip | |
- name: Install coverage | |
run: python -m pip install -U coverage[toml] | |
- uses: actions/download-artifact@v3 | |
with: | |
name: coverage-reports | |
- name: Combine coverage; fail if not 100% | |
run: | | |
python -m coverage combine | |
python -m coverage html --skip-covered --skip-empty | |
python -m coverage report | sed 's/^/ /' >> $GITHUB_STEP_SUMMARY | |
python -m coverage report --fail-under=100 | |
- name: Upload the HTML coverage report on failure | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: html-report | |
path: htmlcov |