Skip to content

Commit 290a23c

Browse files
ci(backport): Update GitHub Actions (#2493)
* Backport: - PR #2443 - PR #2446 - PR #2451 - PR #2458 - PR #2460 - PR #2465 - PR #2468 - PR #2471 - PR #2472
1 parent 1b61882 commit 290a23c

8 files changed

+56
-35
lines changed

.github/workflows/bump-version.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,11 @@ jobs:
190190
echo "steps.script.outputs.old_tag=v${current_tag}"
191191
echo "old_tag=v${current_tag}" >> $GITHUB_OUTPUT
192192
193-
- name: Set up Python 3.11
193+
- name: Set up Python 3.12
194194
if: success()
195195
uses: actions/setup-python@v5
196196
with:
197-
python-version: '3.11'
197+
python-version: '3.12'
198198

199199
- name: Install Python dependencies
200200
run: |

.github/workflows/ci.yml

+27-11
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@ jobs:
2727
strategy:
2828
matrix:
2929
os: [ubuntu-latest]
30-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
30+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
3131
include:
3232
- os: macos-latest
33-
python-version: '3.11'
33+
python-version: '3.12'
34+
# Intel runner
35+
- os: macos-13
36+
python-version: '3.12'
3437

3538
steps:
3639
- uses: actions/checkout@v4
@@ -68,34 +71,47 @@ jobs:
6871
if: >-
6972
github.event_name != 'schedule' &&
7073
matrix.os == 'ubuntu-latest'
71-
uses: codecov/codecov-action@v3
74+
uses: codecov/codecov-action@v4
7275
with:
76+
fail_ci_if_error: true
7377
files: ./coverage.xml
7478
flags: unittests-${{ matrix.python-version }}
79+
token: ${{ secrets.CODECOV_TOKEN }}
7580

7681
- name: Test Contrib module with pytest
7782
run: |
7883
pytest tests/contrib --mpl --mpl-baseline-path tests/contrib/baseline
7984
8085
- name: Report contrib coverage with Codecov
81-
if: github.event_name != 'schedule' && matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
82-
uses: codecov/codecov-action@v3
86+
if: github.event_name != 'schedule' && matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest'
87+
uses: codecov/codecov-action@v4
8388
with:
89+
fail_ci_if_error: true
8490
files: ./coverage.xml
8591
flags: contrib
92+
token: ${{ secrets.CODECOV_TOKEN }}
8693

8794
- name: Test docstring examples with doctest
88-
if: matrix.python-version == '3.11'
89-
run: pytest src/ README.rst
95+
# TODO: Don't currently try to match amd64 and arm64 floating point for docs, but will in the future.
96+
if: matrix.python-version == '3.12' && matrix.os != 'macos-latest'
97+
run: coverage run --data-file=.coverage-doctest --module pytest src/ README.rst
98+
99+
- name: Coverage report for doctest only
100+
if: matrix.python-version == '3.12' && matrix.os != 'macos-latest'
101+
run: |
102+
coverage report --data-file=.coverage-doctest
103+
coverage xml --data-file=.coverage-doctest -o doctest-coverage.xml
90104
91105
- name: Report doctest coverage with Codecov
92-
if: github.event_name != 'schedule' && matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
93-
uses: codecov/codecov-action@v3
106+
if: github.event_name != 'schedule' && matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest'
107+
uses: codecov/codecov-action@v4
94108
with:
95-
files: ./coverage.xml
109+
fail_ci_if_error: true
110+
files: doctest-coverage.xml
96111
flags: doctest
112+
token: ${{ secrets.CODECOV_TOKEN }}
97113

98114
- name: Run benchmarks
99-
if: github.event_name == 'schedule' && matrix.python-version == '3.11'
115+
if: github.event_name == 'schedule' && matrix.python-version == '3.12'
100116
run: |
101117
pytest --benchmark-sort=mean tests/benchmarks/test_benchmark.py

.github/workflows/dependencies-head.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
runs-on: ${{ matrix.os }}
1717
strategy:
1818
matrix:
19-
os: [ubuntu-latest, macos-latest]
20-
python-version: ['3.10']
19+
os: [ubuntu-latest, macos-latest, macos-13]
20+
python-version: ['3.12']
2121

2222
steps:
2323
- uses: actions/checkout@v4
@@ -43,7 +43,7 @@ jobs:
4343
strategy:
4444
matrix:
4545
os: [ubuntu-latest]
46-
python-version: ['3.10']
46+
python-version: ['3.12']
4747

4848
steps:
4949
- uses: actions/checkout@v4
@@ -73,7 +73,7 @@ jobs:
7373
strategy:
7474
matrix:
7575
os: [ubuntu-latest]
76-
python-version: ['3.10']
76+
python-version: ['3.12']
7777

7878
steps:
7979
- uses: actions/checkout@v4
@@ -93,13 +93,13 @@ jobs:
9393
run: |
9494
pytest --ignore tests/benchmarks/ --ignore tests/contrib --ignore tests/test_notebooks.py
9595
96-
uproot4:
96+
uproot5:
9797

9898
runs-on: ${{ matrix.os }}
9999
strategy:
100100
matrix:
101101
os: [ubuntu-latest]
102-
python-version: ['3.10']
102+
python-version: ['3.12']
103103

104104
steps:
105105
- uses: actions/checkout@v4
@@ -124,7 +124,7 @@ jobs:
124124
strategy:
125125
matrix:
126126
os: [ubuntu-latest]
127-
python-version: ['3.10']
127+
python-version: ['3.12']
128128

129129
steps:
130130
- uses: actions/checkout@v4
@@ -160,7 +160,7 @@ jobs:
160160
strategy:
161161
matrix:
162162
os: [ubuntu-latest]
163-
python-version: ['3.10']
163+
python-version: ['3.12']
164164

165165
steps:
166166
- uses: actions/checkout@v4

.github/workflows/docs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Set up Python
2828
uses: actions/setup-python@v5
2929
with:
30-
python-version: '3.11'
30+
python-version: '3.12'
3131

3232
- name: Install Python dependencies
3333
run: |
@@ -116,7 +116,7 @@ jobs:
116116

117117
steps:
118118
- name: Setup Pages
119-
uses: actions/configure-pages@v4
119+
uses: actions/configure-pages@v5
120120

121121
- name: Deploy to GitHub Pages
122122
id: deployment

.github/workflows/notebooks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
strategy:
1818
matrix:
19-
python-version: ['3.10']
19+
python-version: ['3.12']
2020

2121
steps:
2222
- uses: actions/checkout@v4

.github/workflows/publish-package.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ jobs:
3434
with:
3535
fetch-depth: 0
3636

37-
- name: Set up Python 3.11
37+
- name: Set up Python 3.12
3838
uses: actions/setup-python@v5
3939
with:
40-
python-version: '3.11'
40+
python-version: '3.12'
4141

4242
- name: Install python-build and twine
4343
run: |
@@ -130,13 +130,13 @@ jobs:
130130
if: >-
131131
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'scikit-hep/pyhf')
132132
|| (github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true' && github.repository == 'scikit-hep/pyhf')
133-
uses: pypa/[email protected].11
133+
uses: pypa/[email protected].14
134134
with:
135135
repository-url: https://test.pypi.org/legacy/
136136
print-hash: true
137137

138138
- name: Publish distribution 📦 to PyPI
139139
if: github.event_name == 'release' && github.event.action == 'published' && github.repository == 'scikit-hep/pyhf'
140-
uses: pypa/[email protected].11
140+
uses: pypa/[email protected].14
141141
with:
142142
print-hash: true

.github/workflows/release_tests.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,14 @@ jobs:
1818
strategy:
1919
matrix:
2020
os: [ubuntu-latest]
21-
python-version: ['3.7', '3.8', '3.9', '3.10']
21+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
2222
include:
2323
- os: macos-latest
24-
python-version: '3.10'
24+
python-version: '3.12'
25+
# Intel runner
26+
- os: macos-13
27+
python-version: '3.12'
28+
fail-fast: false
2529

2630
steps:
2731
- uses: actions/checkout@v4

pyproject.toml

+6-5
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ classifiers = [
3939
"Programming Language :: Python :: 3.9",
4040
"Programming Language :: Python :: 3.10",
4141
"Programming Language :: Python :: 3.11",
42+
"Programming Language :: Python :: 3.12",
4243
"Programming Language :: Python :: Implementation :: CPython",
4344
"Topic :: Scientific/Engineering",
4445
"Topic :: Scientific/Engineering :: Physics",
@@ -108,23 +109,23 @@ test = [
108109
"pytest-mpl",
109110
"ipympl>=0.3.0",
110111
"pydocstyle",
111-
"papermill~=2.3.4",
112-
"scrapbook~=0.5.0",
112+
"papermill>=2.3.4",
113+
"scrapbook>=0.5.0",
113114
"jupyter",
114115
"graphviz",
115116
"pytest-socket>=0.2.0", # c.f. PR #1917
116117
]
117118
docs = [
118119
"pyhf[xmlio,contrib]",
119120
"sphinx>=7.0.0", # c.f. https://github.com/scikit-hep/pyhf/pull/2271
120-
"sphinxcontrib-bibtex~=2.1",
121+
"sphinxcontrib-bibtex>=2.1",
121122
"sphinx-click",
122123
"sphinx-rtd-theme>=1.3.0", # c.f. https://github.com/scikit-hep/pyhf/pull/2271
123124
"nbsphinx!=0.8.8", # c.f. https://github.com/spatialaudio/nbsphinx/issues/620
124125
"ipywidgets",
125126
"sphinx-issues",
126127
"sphinx-copybutton>=0.3.2,!=0.5.1",
127-
"jupyterlite-sphinx>=0.8.0",
128+
"jupyterlite-sphinx>=0.13.1", # c.f. https://github.com/scikit-hep/pyhf/pull/2458
128129
"jupyterlite-pyodide-kernel>=0.0.7",
129130
"jupytext>=1.14.0",
130131
"ipython!=8.7.0", # c.f. https://github.com/scikit-hep/pyhf/pull/2068
@@ -236,7 +237,7 @@ filterwarnings = [
236237

237238
[tool.mypy]
238239
files = "src"
239-
python_version = "3.11"
240+
python_version = "3.12"
240241
warn_unused_configs = true
241242
strict = true
242243
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]

0 commit comments

Comments
 (0)