Skip to content

Commit

Permalink
CI: adding devdeps testing and cron and workflow dispatch (#639)
Browse files Browse the repository at this point in the history
* MAINT: fix tox syntax

* CI: adding CI workflow to test with developer version of dependencies

* CI: adding cronjob and workflow dispatch

* CI: cleanup upper limits as these should be picked up by the devdeps job

* CI: avoid windows error by relying on available pip; print out installed versions to help future debugging
  • Loading branch information
bsipocz authored Nov 11, 2024
1 parent 8389654 commit aee9a46
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 5 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
tags:
- 'v*'
pull_request:
schedule:
# run every Monday at 5am UTC
- cron: '0 5 * * 1'
workflow_dispatch:

jobs:

Expand All @@ -16,8 +20,8 @@ jobs:
matrix:
os: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
sphinx: [">=5,<9"] # Newest Sphinx (any)
myst-parser: [">=1,<3"] # Newest MyST Parser (any)
sphinx: [""] # Newest Sphinx (any)
myst-parser: [""] # Newest MyST Parser (any)
include:
# Just check the other platforms once
- os: windows-latest
Expand Down Expand Up @@ -57,12 +61,12 @@ jobs:
- name: Install myst-nb with Sphinx ${{ matrix.sphinx }}
shell: bash
run: |
pip install --upgrade pip
# Temporary: for python 3.13 we need the nightly pyarrow wheels
if [[ ${{ matrix.python-version }} == '3.13' ]] ; then
PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pip install --pre pyarrow
fi
pip install --upgrade "Sphinx${{ matrix.sphinx }}" "myst-parser${{ matrix.myst-parser }}" -e .[testing]
pip freeze
- name: Run pytest
run: pytest --durations=10
Expand All @@ -80,8 +84,8 @@ jobs:
cache: pip
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -e .[testing]
pip freeze
- name: Run pytest
run: pytest --durations=10 --cov=myst_nb --cov-report=xml --cov-report=term-missing
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/tests_devdeps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: continuous-integration-devdeps

on:
push:
branches: [master]
schedule:
# run every Monday at 5am UTC
- cron: '0 5 * * 1'
workflow_dispatch:

jobs:

tests:

strategy:
fail-fast: false
matrix:
sphinx: [""] # Newest Sphinx (any)
myst-parser: [""] # Newest MyST Parser (any)

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: Install myst-nb with development Sphinx and myst-parser versions
run: |
pip install --upgrade pip
pip install --upgrade git+https://github.com/executablebooks/MyST-Parser.git#egg=myst-parser git+https://github.com/sphinx-doc/sphinx.git#egg=sphinx -e .[testing]
- name: Run pytest
run: pytest --durations=10
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ deps =
ipython
setenv =
BUILDER = {env:BUILDER:html}
whitelist_externals =
allowlist_externals =
echo
rm
commands =
pip freeze
clean: rm -rf docs/_build
sphinx-build {posargs} -nW --keep-going -b {env:BUILDER} docs/ docs/_build/{env:BUILDER}
commands_post = echo "open file://{toxinidir}/docs/_build/{env:BUILDER}/index.html"
Expand Down

0 comments on commit aee9a46

Please sign in to comment.