File tree Expand file tree Collapse file tree 5 files changed +885
-17
lines changed Expand file tree Collapse file tree 5 files changed +885
-17
lines changed Original file line number Diff line number Diff line change @@ -31,12 +31,15 @@ jobs:
3131 with :
3232 python-version : " 3.13"
3333
34+ - name : Setup uv
35+ uses : astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
36+
3437 - name : Install dependencies
35- run : pip install -e .[ dev]
38+ run : uv sync -- dev
3639
3740 - name : Run benchmarks
3841 uses : CodSpeedHQ/action@4348f634fa7309fe23aac9502e88b999ec90a164 # v3
3942 with :
4043 token : ${{ secrets.CODSPEED_TOKEN }}
41- run : pytest tests/ --codspeed
44+ run : uv run pytest tests/ --codspeed
4245 mode : instrumentation
Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ name: Test
22
33on :
44 push :
5- branches : main
5+ branches : [ main]
66 pull_request :
7- branches : main
7+ branches : [ main]
88 workflow_dispatch :
99
1010jobs :
@@ -22,16 +22,17 @@ jobs:
2222 with :
2323 python-version : ${{ matrix.python-version }}
2424
25+ - name : Setup uv
26+ uses : astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
27+
2528 - name : Install dependencies
26- run : |
27- python -m pip install --upgrade pip
28- pip install .[dev]
29+ run : uv sync --dev
2930
3031 - name : Run tests and collect coverage
31- run : |
32- coverage run --source=tests,cpp_linter_hooks -m pytest -vv
33- coverage report
34- coverage xml
32+ run : |-
33+ uv run coverage run --source=tests,cpp_linter_hooks -m pytest -vv
34+ uv run coverage report
35+ uv run coverage xml
3536 - uses : codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5
3637 if : matrix.python-version == '3.13'
3738 with :
Original file line number Diff line number Diff line change 22requires = [" setuptools>=45" , " setuptools-scm" ]
33build-backend = " setuptools.build_meta"
44
5- requires-python = " >=3.9"
6-
75[project ]
6+ requires-python = " >=3.9"
87name = " cpp_linter_hooks"
98description = " Automatically formats and lints C/C++ code using clang-format and clang-tidy"
109readme = " README.md"
@@ -48,7 +47,7 @@ clang-tidy-hook = "cpp_linter_hooks.clang_tidy:main"
4847source = " https://github.com/cpp-linter/cpp-linter-hooks"
4948tracker = " https://github.com/cpp-linter/cpp-linter-hooks/issues"
5049
51- [project . optional-dependencies ]
50+ [dependency-groups ]
5251dev = [
5352 " coverage" ,
5453 " pre-commit" ,
@@ -83,4 +82,4 @@ omit = ["tests/*"]
8382exclude_also = [
8483 " __name__" ,
8584 " FileNotFoundError"
86- ]
85+ ]
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ for config in "${configs[@]}"; do
1111 echo " ===================================="
1212 echo " Test $config "
1313 echo " ===================================="
14- pre-commit clean
15- pre-commit run -c testing/$config --files testing/main.c | tee -a result.txt || true
14+ uvx pre-commit clean
15+ uvx pre-commit run -c testing/$config --files testing/main.c | tee -a result.txt || true
1616 git restore testing/main.c
1717done
1818
You can’t perform that action at this time.
0 commit comments