File: codspeed.yml

package info (click to toggle)
pytest-codspeed 4.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,608 kB
  • sloc: ansic: 9,792; python: 2,066; sh: 41; makefile: 14
file content (49 lines) | stat: -rw-r--r-- 1,358 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: CodSpeed
on:
  push:
    branches: [master]
  pull_request:
    branches: [master]
  workflow_dispatch:

env:
  PYTHON_VERSION: "3.14"
  SHARDS: 4

jobs:
  benchmarks:
    strategy:
      matrix:
        shard: [1, 2, 3, 4]
        mode: ["instrumentation", "walltime"]

    name: "Run ${{ matrix.mode }} benchmarks (Shard #${{ matrix.shard }})"
    runs-on: ${{ matrix.mode == 'instrumentation' && 'ubuntu-24.04' || 'codspeed-macro' }}
    steps:
      - uses: actions/checkout@v5
        with:
          submodules: "recursive"
      - name: Install required-version defined in uv.toml
        uses: astral-sh/setup-uv@v7
      - uses: actions/setup-python@v6
        with:
          python-version: ${{ env.PYTHON_VERSION }}
      - name: Install local version of pytest-codspeed
        run: |
          sudo apt-get update
          sudo apt-get install valgrind -y
          uv sync --dev
          sudo apt-get remove valgrind -y
      - name: Run benchmarks
        uses: CodSpeedHQ/action@main
        with:
          mode: ${{ matrix.mode }}
          run: uv run pytest tests/benchmarks/ --codspeed --test-group=${{ matrix.shard }} --test-group-count=${{ env.SHARDS }}
          token: ${{ secrets.CODSPEED_TOKEN }}

  all-checks:
    runs-on: ubuntu-latest
    steps:
      - run: echo "All CI checks passed."
    needs:
      - benchmarks