feat: add initial codspeed integration #1
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] | |
| tags: ["*"] | |
| paths: | |
| - src/**.py | |
| - bench/** | |
| - .github/workflows/codspeed.yml | |
| pull_request: | |
| paths: | |
| - src/**.py | |
| - bench/** | |
| - .github/workflows/codspeed.yml | |
| workflow_dispatch: | |
| permissions: | |
| contents: read # required for actions/checkout | |
| id-token: write # required for OIDC authentication with CodSpeed | |
| jobs: | |
| codspeed: | |
| name: Run CodSpeed benchmarks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6.0.0 # Use a fixed version | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@v6.1.0 # Use a fixed version | |
| with: | |
| python-version: "3.11" # Assuming Python 3.11, adjust if needed | |
| - uses: hynek/setup-cached-uv@v2.3.0 # Use a fixed version | |
| - name: Run CodSpeed benchmarks | |
| uses: CodSpeedHQ/action@v4.4.1 # Use a fixed version | |
| with: | |
| mode: instrumentation | |
| run: | | |
| uv pip install pytest-codspeed | |
| uv run pytest --codspeed bench/ |