diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b5174d5e..dafab884 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -26,15 +26,15 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python-version: ["3.8", "3.9", "3.10"] - sphinx: [">=5,<6"] + python-version: ["3.8", "3.9", "3.10", "3.11"] + sphinx: ["~=5.0","~=6.0","~=7.0"] include: - os: windows-latest python-version: 3.9 - sphinx: ">=5,<6" + sphinx: "~=5.0" - os: macos-latest python-version: 3.9 - sphinx: ">=5,<6" + sphinx: "~=5.0" runs-on: ${{ matrix.os }} @@ -44,10 +44,29 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + cache: pip + - name: Install myst-nb with Sphinx ${{ matrix.sphinx }} + run: | + pip install --upgrade pip + pip install --upgrade "Sphinx${{ matrix.sphinx }}" -e .[testing] + + - name: Run pytest + run: pytest --durations=10 + + coverage: + needs: [tests] + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: 3.11 + cache: pip - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install "sphinx${{ matrix.sphinx }}" + pip install --upgrade pip pip install -e .[testing] - name: Run pytest @@ -59,13 +78,11 @@ jobs: # this is why we run `coverage xml` afterwards (required by codecov) - name: Upload to Codecov - if: github.repository == 'executablebooks/MyST-NB' && matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest' uses: codecov/codecov-action@v3 with: name: myst-nb-pytests flags: pytests files: ./coverage.xml - fail_ci_if_error: true publish: diff --git a/pyproject.toml b/pyproject.toml index cf333e5e..fc27f2c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,10 +38,10 @@ dependencies = [ "ipython", "jupyter-cache>=0.5,<0.7", "nbclient", # nbclient version pinned by jupyter-client - "myst-parser~=1.0.0", + "myst-parser>=0.18.0", "nbformat~=5.0", "pyyaml", - "sphinx>=4,<6", + "sphinx>=4", "typing-extensions", # ipykernel is not a requirement of the library, # but is a common requirement for users (registers the python3 kernel) @@ -79,7 +79,7 @@ rtd = [ "numpy", "pandas", "plotly", - "sphinx-book-theme~=1.0.0", + "sphinx-book-theme>=0.3", "sphinx-copybutton", "sphinx-design~=0.4.0", "sphinxcontrib-bibtex",