feat: add CodSpeed to the project #387
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Benchmarking pypdf | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
permissions: | |
contents: write | |
deployments: write | |
jobs: | |
benchmark: | |
name: Run pytest-benchmark | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install requirements (Python 3) | |
run: | | |
pip install -r requirements/ci-3.11.txt | |
- name: Install pypdf | |
run: | | |
pip install . | |
- name: Run benchmarks | |
uses: CodSpeedHQ/action@v2 | |
with: | |
token: ${{ secrets.CODSPEED_TOKEN }} | |
run: pytest tests/bench.py --codspeed |