🐛 FIX needflow graphviz links #2335
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: 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 3.8 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.8' | |
- 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"] | |
# 3.9.8 seems to be broken with type_ast | |
# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1829077.html | |
python-version: ["3.8", "3.11"] | |
sphinx-version: ["6.0", "7.0"] | |
include: | |
- os: "ubuntu-latest" | |
python-version: "3.10" | |
sphinx-version: "8.0" | |
- os: "windows-latest" | |
python-version: "3.8" | |
sphinx-version: "6.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.8" | |
sphinx-version: "6.0" | |
- os: "ubuntu-latest" | |
python-version: "3.11" | |
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) }} |