66 tags :
77 - ' v*'
88 pull_request :
9+ schedule :
10+ # run every Monday at 5am UTC
11+ - cron : ' 0 5 * * 1'
12+ workflow_dispatch :
913
1014jobs :
11- pre-commit :
12-
13- runs-on : ubuntu-latest
14-
15- steps :
16- - uses : actions/checkout@v2
17- - name : Set up Python 3.8
18- uses : actions/setup-python@v1
19- with :
20- python-version : 3.9
21- - uses : pre-commit/action@v2.0.0
2215
2316 tests :
2417
2518 strategy :
2619 fail-fast : false
2720 matrix :
2821 os : [ubuntu-latest]
29- python-version : ["3.7", "3.8", "3.9", "3.10"]
30- sphinx : [">=5,<6"]
22+ python-version : ["3.9", "3.10", "3.11", "3.12", "3.13"]
23+ sphinx : [""] # Newest Sphinx (any)
24+ myst-parser : [""] # Newest MyST Parser (any)
3125 include :
32- - os : ubuntu-latest
33- python-version : 3.7
34- sphinx : " >=4,<5"
26+ # Just check the other platforms once
3527 - os : windows-latest
36- python-version : 3.8
37- sphinx : " >=5,<6"
28+ python-version : " 3.12"
29+ sphinx : " ~=8.0"
30+ myst-parser : " ~=4.0"
31+ pillow : " ==11.0.0"
3832 - os : macos-latest
39- python-version : 3.8
40- sphinx : " >=5,<6"
33+ python-version : " 3.12"
34+ sphinx : " ~=8.0"
35+ myst-parser : " ~=4.0"
36+ pillow : " ==11.0.0"
37+ - os : ubuntu-latest
38+ python-version : " 3.12"
39+ sphinx : " ~=8.0"
40+ myst-parser : " ~=4.0"
41+ pillow : " ==11.0.0"
42+ # Oldest known-compatible dependencies
43+ - os : ubuntu-latest
44+ python-version : " 3.9"
45+ sphinx : " ==5.0.0"
46+ myst-parser : " ==1.0.0"
47+ pillow : " ==11.0.0"
48+ # Mid-range dependencies
49+ - os : ubuntu-latest
50+ python-version : " 3.11"
51+ sphinx : " ==7.0.0"
52+ myst-parser : " ==3.0.0"
53+ pillow : " ==11.0.0"
54+ # Newest known-compatible dependencies
55+ - os : ubuntu-latest
56+ python-version : " 3.12"
57+ sphinx : " ==8.0.2"
58+ myst-parser : " ==4.0.0"
59+ pillow : " ==11.0.0"
4160
4261 runs-on : ${{ matrix.os }}
4362
4463 steps :
45- - uses : actions/checkout@v2
64+ - uses : actions/checkout@v4
4665 - name : Set up Python ${{ matrix.python-version }}
47- uses : actions/setup-python@v1
66+ uses : actions/setup-python@v5
4867 with :
4968 python-version : ${{ matrix.python-version }}
69+ allow-prereleases : true
70+ cache : pip
71+ - name : Install myst-nb with Sphinx ${{ matrix.sphinx }}
72+ shell : bash
73+ run : |
74+ pip install --upgrade "Sphinx${{ matrix.sphinx }}" "myst-parser${{ matrix.myst-parser }}" "pillow${{ matrix.pillow }}" -e .[testing]
75+ pip freeze
76+
77+ - name : Run pytest
78+ run : pytest --durations=10
79+
80+ coverage :
81+ needs : [tests]
82+ runs-on : ubuntu-latest
83+
84+ steps :
85+ - uses : actions/checkout@v4
86+ - name : Set up Python ${{ matrix.python-version }}
87+ uses : actions/setup-python@v5
88+ with :
89+ python-version : " 3.11"
90+ cache : pip
5091 - name : Install dependencies
5192 run : |
52- python -m pip install --upgrade pip
53- pip install "sphinx${{ matrix.sphinx }}"
5493 pip install -e .[testing]
94+ pip freeze
5595
5696 - name : Run pytest
5797 run : pytest --durations=10 --cov=myst_nb --cov-report=xml --cov-report=term-missing
@@ -61,28 +101,28 @@ jobs:
61101 # for some reason the tests/conftest.py::check_nbs fixture breaks pytest-cov's cov-report outputting
62102 # this is why we run `coverage xml` afterwards (required by codecov)
63103
104+ # TEMPORARY FIX: Disable codecov until we can get it working again
64105 - name : Upload to Codecov
65- if : github.repository == 'executablebooks/MyST-NB' && matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest'
66- uses : codecov/codecov-action@v3
106+ uses : codecov/codecov-action@v4
107+ if : false
67108 with :
68109 name : myst-nb-pytests
69110 flags : pytests
70111 files : ./coverage.xml
71- fail_ci_if_error : true
72112
73113 publish :
74114
75115 name : Publish to PyPi
76- needs : [pre-commit, tests]
116+ needs : [tests]
77117 if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
78118 runs-on : ubuntu-latest
79119 steps :
80120 - name : Checkout source
81- uses : actions/checkout@v2
121+ uses : actions/checkout@v4
82122 - name : Set up Python
83- uses : actions/setup-python@v1
123+ uses : actions/setup-python@v5
84124 with :
85- python-version : 3.8
125+ python-version : " 3.10 "
86126 - name : install flit
87127 run : |
88128 pip install flit~=3.4
0 commit comments