| --- |
| 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: |
| |
| concurrency: |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| cancel-in-progress: true |
| |
| 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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
| with: |
| persist-credentials: false |
| - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 |
| with: |
| python-version-file: .python-version-default |
| - uses: hynek/setup-cached-uv@4300ec2180bc77d705e626a34e381b81a4772c51 # v2.5.0 |
| |
| - name: Run CodSpeed benchmarks |
| uses: CodSpeedHQ/action@a4a36bb07c0638b0b4ca52bf1f3dad1b4289e52f # v4.18.1 |
| with: |
| mode: simulation |
| run: uvx --with tox-uv tox run -e codspeed |