| --- |
| 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: |
| |
| |
| env: |
| FORCE_COLOR: "1" |
| PIP_DISABLE_PIP_VERSION_CHECK: "1" |
| PIP_NO_PYTHON_VERSION_WARNING: "1" |
| |
| permissions: {} |
| |
| jobs: |
| codspeed: |
| name: Run CodSpeed benchmarks |
| runs-on: ubuntu-latest |
| |
| steps: |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| with: |
| persist-credentials: false |
| - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 |
| with: |
| python-version-file: .python-version-default |
| - uses: hynek/setup-cached-uv@757bedc3f972eb7227a1aa657651f15a8527c817 # v2.3.0 |
| |
| - name: Run CodSpeed benchmarks |
| uses: CodSpeedHQ/action@653fdc30e6c40ffd9739e40c8a0576f4f4523ca1 # v4.0.1 |
| with: |
| mode: instrumentation |
| token: ${{ secrets.CODSPEED_TOKEN }} |
| run: uvx --with tox-uv tox run -e codspeed |