⬆️ Update lxml requirement from <5.0,>=4.6.5 to >=4.6.5,<6.0 #2379
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: CI | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
- uses: pre-commit/action@v3.0.1 | |
tests-core: | |
name: "Core py${{ matrix.python-version }} sphinx~=${{ matrix.sphinx-version }} ${{ matrix.os }}" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false # Set on "false" to get the results of ALL builds | |
matrix: | |
os: ["ubuntu-latest"] | |
python-version: ["3.10", "3.12"] | |
sphinx-version: ["7.0", "8.0"] | |
include: | |
- os: "ubuntu-latest" | |
python-version: "3.9" | |
sphinx-version: "7.0" | |
- os: "windows-latest" | |
python-version: "3.9" | |
sphinx-version: "7.0" | |
- os: "windows-latest" | |
python-version: "3.12" | |
sphinx-version: "8.0" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install graphviz (linux) | |
if: matrix.os == 'ubuntu-latest' | |
run: sudo apt-get install graphviz | |
- name: Install graphviz (windows) | |
if: matrix.os == 'windows-latest' | |
run: choco install --no-progress graphviz | |
- name: Set Up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Update pip | |
run: python -m pip install --upgrade pip | |
- name: Install dependencies | |
run: | | |
python -m pip install sphinx~=${{ matrix.sphinx-version }} -e .[test] | |
python -m pip freeze | |
- name: Run pytest | |
run: python -m pytest -v --ignore=tests/benchmarks -m "not jstest" --cov=sphinx_needs --cov-report=xml --cov-report=term-missing tests | |
- name: Create coverage | |
run: coverage xml | |
- name: Upload to Codecov | |
if: github.event.pull_request.head.repo.full_name == github.repository && github.repository == 'useblocks/sphinx-needs' && matrix.os == 'ubuntu-latest' | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
name: sphinx-need-pytests | |
flags: pytests | |
file: ./coverage.xml | |
fail_ci_if_error: true | |
tests-js: | |
name: "JS py${{ matrix.python-version }} sphinx~=${{ matrix.sphinx-version }} ${{ matrix.os }}" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: "ubuntu-latest" | |
python-version: "3.9" | |
sphinx-version: "7.0" | |
- os: "ubuntu-latest" | |
python-version: "3.12" | |
sphinx-version: "8.0" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install Cypress Test Framework | |
run: npm install cypress | |
- name: Set Up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Update pip | |
run: python -m pip install --upgrade pip | |
- name: Install dependencies | |
run: | | |
python -m pip install sphinx~=${{ matrix.sphinx-version }} -e .[test] | |
python -m pip freeze | |
- name: Run pytest | |
run: | | |
python -m pytest -v --ignore=tests/benchmarks -m "jstest" tests | |
tests-no-mpl: | |
name: Test matplotlib uninstalled | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set Up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Update pip | |
run: python -m pip install --upgrade pip | |
- name: Install Dependencies | |
run: | | |
python -m pip install -e .[test,docs] | |
python -m pip uninstall -y matplotlib numpy | |
python -m pip freeze | |
- name: Run pytest | |
run: | | |
python -m pytest -v tests/no_mpl_tests.py | |
- name: Run HTML build | |
# the docs should build without matplotlib (just issuing warnings) | |
run: sphinx-build -b html . _build | |
working-directory: docs | |
check: | |
# This job does nothing and is only used for the branch protection | |
# see https://github.com/marketplace/actions/alls-green#why | |
if: always() | |
needs: | |
- lint | |
- tests-core | |
- tests-js | |
- tests-no-mpl | |
runs-on: ubuntu-latest | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} |