add benchmarks using pytest-benchmark and codspeed #4
Workflow file for this run
  
    
      This file contains hidden or 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: CodSpeed Benchmarks | |
| on: | |
| push: | |
| branches: | |
| - "main" # or "master" | |
| pull_request: | |
| # `workflow_dispatch` allows CodSpeed to trigger backtest | |
| # performance analysis in order to generate initial data. | |
| workflow_dispatch: | |
| jobs: | |
| benchmarks: | |
| name: Run benchmarks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 # grab all branches and tags | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| - name: Install Hatch | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install hatch | |
| - name: Run the benchmarks | |
| uses: CodSpeedHQ/action@v4 | |
| with: | |
| mode: instrumentation | |
| run: hatch run test.py3.11-1.26-minimal:run-benchmark |