Skip to content

🎨 Update docs theme and add tutorial #1908

🎨 Update docs theme and add tutorial

🎨 Update docs theme and add tutorial #1908

Workflow file for this run

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/[email protected]
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/[email protected]/msg1829077.html
python-version: ["3.8", "3.11"]
sphinx-version: ["5.0", "6.0", "7.0"]
include:
- os: "windows-latest"
python-version: "3.8"
sphinx-version: "5.0"
steps:
- uses: actions/checkout@v4
- 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.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: "5.0"
- os: "ubuntu-latest"
python-version: "3.11"
sphinx-version: "7.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) }}