File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626 - name : Install the latest version of uv
2727 uses : astral-sh/setup-uv@v5
2828 - name : Install dependencies
29- run : uv sync --all-extras
29+ run : uv sync --all-extras --group benchmark
3030 - name : Run benchmarks
3131 uses : CodSpeedHQ/action@v4
3232 with :
Original file line number Diff line number Diff line change @@ -85,8 +85,6 @@ test = [
8585 " msgspec>=0.18" ,
8686 " pytest>=6.1" ,
8787 " pytest>=8.3.4" ,
88- " pytest-benchmark" ,
89- " pytest-codspeed>=2.2" ,
9088 " pytest-cov>=2.12.1" ,
9189 " pytest-cov>=5" ,
9290 " pytest-mock>=3.14" ,
@@ -106,6 +104,10 @@ type = [
106104docs = [
107105 " zensical>=0.0.15; python_version>='3.10'" ,
108106]
107+ benchmark = [
108+ " pytest-benchmark" ,
109+ " pytest-codspeed>=2.2" ,
110+ ]
109111black22 = [ " black==22.1" ]
110112black23 = [ " black==23.12" ]
111113black24 = [ " black==24.1" ]
@@ -230,7 +232,10 @@ filterwarnings = [
230232]
231233norecursedirs = [ " tests/data/*" , " .tox" ]
232234verbosity_assertions = 2
233- markers = [ " perf: marks tests as performance tests (excluded from CI benchmarks)" ]
235+ markers = [
236+ " perf: marks tests as performance tests (excluded from CI benchmarks)" ,
237+ " benchmark: marks tests as benchmark tests" ,
238+ ]
234239
235240[tool .coverage ]
236241html.skip_covered = false
Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ commands =
3838 parallel: -n auto \
3939 --color =yes \
4040 -m " not perf" \
41- -p no:codspeed --benchmark-disable \
4241 --cov {env_site_packages_dir}{/}datamodel_code_generator --cov {tox_root}{/}tests \
4342 --cov-config =pyproject.toml --cov-fail-under =0 --no-cov-on-fail --cov-report term-missing:skip-covered \
4443 --cov-report html:{env_tmp_dir}{/}htmlcov \
@@ -169,5 +168,7 @@ commands =
169168 --color =yes \
170169 --codspeed \
171170 tests/main/test_performance.py}
172- dependency_groups = test
171+ dependency_groups =
172+ test
173+ benchmark
173174platform = linux|darwin
You can’t perform that action at this time.
0 commit comments