Skip to content

Commit 56b87cf

Browse files
adriencacciacodspeedbot
authored andcommitted
feat: add CodSpeed to the project
1 parent 926fa7f commit 56b87cf

9 files changed

Lines changed: 25 additions & 421 deletions

File tree

.github/workflows/benchmark.yaml

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
push:
44
branches:
55
- main
6+
pull_request:
67

78
permissions:
89
contents: write
@@ -12,9 +13,6 @@ jobs:
1213
benchmark:
1314
name: Run pytest-benchmark
1415
runs-on: ubuntu-latest
15-
strategy:
16-
matrix:
17-
python-version: ["3.10"]
1816
steps:
1917
- name: Checkout Code
2018
uses: actions/checkout@v4
@@ -23,27 +21,15 @@ jobs:
2321
- name: Setup Python
2422
uses: actions/setup-python@v5
2523
with:
26-
python-version: ${{ matrix.python-version }}
24+
python-version: 3.12
2725
- name: Install requirements (Python 3)
2826
run: |
29-
pip install -r requirements/ci.txt
27+
pip install -r requirements/ci-3.11.txt
3028
- name: Install pypdf
3129
run: |
3230
pip install .
33-
- name: Run benchmark
34-
run: |
35-
pytest tests/bench.py --benchmark-json output.json
36-
- name: Store benchmark result
37-
uses: benchmark-action/github-action-benchmark@v1
31+
- name: Run benchmarks
32+
uses: CodSpeedHQ/action@v2
3833
with:
39-
name: Python Benchmark with pytest-benchmark
40-
tool: 'pytest'
41-
output-file-path: output.json
42-
# Use personal access token instead of GITHUB_TOKEN due to https://github.community/t/github-action-not-triggering-gh-pages-upon-push/16096
43-
github-token: ${{ secrets.GITHUB_TOKEN }}
44-
auto-push: true
45-
# Show alert with commit comment on detecting possible performance regression
46-
alert-threshold: '200%'
47-
comment-on-alert: true
48-
fail-on-alert: true
49-
alert-comment-cc-users: '@MartinThoma'
34+
token: ${{ secrets.CODSPEED_TOKEN }}
35+
run: pytest tests/bench.py --codspeed

.github/workflows/create-github-release.yaml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/github-ci.yaml

Lines changed: 0 additions & 233 deletions
This file was deleted.

.github/workflows/publish-to-pypi.yaml

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)