File tree 3 files changed +42
-25
lines changed
3 files changed +42
-25
lines changed Original file line number Diff line number Diff line change 8
8
9
9
env :
10
10
PYTHON_VERSION : " 3.12"
11
+ SHARDS : 4
11
12
12
13
jobs :
13
14
benchmarks-instrumentation :
14
15
strategy :
15
16
matrix :
16
- include :
17
- - mode : " instrumentation"
18
- runs-on : ubuntu-24.04
19
- - mode : " walltime"
20
- runs-on : codspeed-macro
17
+ shard : [0, 1, 2, 3]
18
+ mode : ["instrumentation", "walltime"]
21
19
22
- name : Run ${{ matrix.mode }} benchmarks
23
- runs-on : ${{ matrix.runs-on }}
20
+ name : Run ${{ matrix.mode }} benchmarks (Shard \#${{ matrix.shard }})
21
+ runs-on : ${{ matrix.mode == 'instrumentation' && 'ubuntu-24.04' || 'codspeed-macro' }}
24
22
steps :
25
23
- uses : actions/checkout@v4
26
24
with :
27
25
submodules : " recursive"
26
+ - name : Install required-version defined in uv.toml
27
+ uses : astral-sh/setup-uv@v5
28
28
- uses : actions/setup-python@v2
29
29
with :
30
30
python-version : ${{ env.PYTHON_VERSION }}
31
31
- name : Install local version of pytest-codspeed
32
32
run : |
33
33
sudo apt-get update
34
34
sudo apt-get install valgrind -y
35
- pip install .
35
+ uv sync --dev
36
36
sudo apt-get remove valgrind -y
37
37
- name : Run benchmarks
38
38
uses : CodSpeedHQ/action@main
39
39
with :
40
- run : pytest tests/benchmarks/ --codspeed
40
+ run : uv run pytest tests/benchmarks/ --codspeed --test-group=${{ matrix.shard }} --test-group-count=${{ env.SHARDS }}
41
41
token : ${{ secrets.CODSPEED_TOKEN }}
Original file line number Diff line number Diff line change @@ -37,19 +37,24 @@ dependencies = [
37
37
]
38
38
39
39
[project .optional-dependencies ]
40
- lint = [" mypy ~= 1.11.2" , " ruff ~= 0.6.5" ]
41
40
compat = [
42
41
" pytest-benchmark ~= 5.0.0" ,
43
42
" pytest-xdist ~= 3.6.1" ,
44
43
# "pytest-speed>=0.3.5",
45
44
]
46
- test = [" pytest ~= 7.0" , " pytest-cov ~= 4.0.0" ]
47
45
48
46
[tool .uv .sources ]
49
47
pytest-codspeed = { workspace = true }
50
48
51
49
[dependency-groups ]
52
- dev = [" pytest-codspeed" ]
50
+ dev = [
51
+ " pytest-codspeed" ,
52
+ " mypy ~= 1.11.2" ,
53
+ " ruff ~= 0.6.5" ,
54
+ " pytest ~= 7.0" ,
55
+ " pytest-cov ~= 4.0.0" ,
56
+ " pytest-test-groups>=1.1.0" ,
57
+ ]
53
58
54
59
[project .entry-points ]
55
60
pytest11 = { codspeed = " pytest_codspeed.plugin" }
You can’t perform that action at this time.
0 commit comments