Skip to content

Commit 67d1ba1

Browse files
MAINT: Improve benchmarking code (#3315)
This commit updates some outdated references in the benchmarking job and fixes compatibility with the latest *pytest* versions. With our settings and the benchmarking and xdist plugins enabled, running the tests on `pytest>=8.4.0` would break/fail otherwise.
1 parent 4fbc38d commit 67d1ba1

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

.github/workflows/benchmark.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
uses: actions/setup-python@v5
2525
with:
2626
python-version: ${{ matrix.python-version }}
27-
- name: Install requirements (Python 3)
27+
- name: Install requirements
2828
run: |
2929
pip install -r requirements/ci-3.11.txt
3030
- name: Install pypdf
@@ -46,4 +46,3 @@ jobs:
4646
alert-threshold: '200%'
4747
comment-on-alert: true
4848
fail-on-alert: true
49-
alert-comment-cc-users: '@MartinThoma'

.github/workflows/github-ci.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
python -c "from tests import download_test_pdfs; download_test_pdfs()"
5050
- name: Test with pytest
5151
run: |
52-
python -m pytest tests --cov=pypdf --cov-append -n auto -vv
52+
python -m pytest tests --cov=pypdf --cov-append -n auto -vv -p no:benchmark
5353
5454
5555
tests:
@@ -137,7 +137,7 @@ jobs:
137137
echo " pass" >> $SITECUSTOMIZE_PATH
138138
- name: Test with pytest
139139
run: |
140-
python -m pytest tests --cov=pypdf --cov-append -n auto -vv
140+
python -m pytest tests --cov=pypdf --cov-append -n auto -vv -p no:benchmark
141141
env:
142142
COVERAGE_PROCESS_START: 'pyproject.toml'
143143
- name: Rename coverage data file
@@ -197,7 +197,7 @@ jobs:
197197
- uses: actions/checkout@v4
198198
- uses: actions/setup-python@v5
199199
with:
200-
python-version: ${{env.PYTHON_LATEST}}
200+
python-version: ${{ env.PYTHON_LATEST }}
201201

202202
- run: python -m pip install flit check-wheel-contents
203203
- run: flit build
@@ -221,7 +221,7 @@ jobs:
221221
- uses: actions/setup-python@v5
222222
with:
223223
# Use latest Python, so it understands all syntax.
224-
python-version: ${{env.PYTHON_LATEST}}
224+
python-version: ${{ env.PYTHON_LATEST }}
225225

226226
- run: python -m pip install --upgrade coverage[toml]
227227

0 commit comments

Comments
 (0)