Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: adding devdeps testing and cron and workflow dispatch #639

Merged
merged 5 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Comment on lines +23 to +24
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd prefer to revert this one change, so that PRs only fail if (within reason) the changes themselves cause a breakage. If we pin our deps to known-good versions, that will help there.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thus the importance of the devdeps run, e.g. no PRs will run into surprises as any issues will be picked up sooner and if needed your pins can be introduced when needed and but not as a blanket measure.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@agoose77 - are you OK with my response here, namely that we should not run into any issues when a sphinx release is problematic as we have already seen those with the devdeps testing (see below), and if a problem is complicated to fix, we can introduce a pin specific to that as opposed to this blanket pin.

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