Skip to content

Commit f4e6d1b

Browse files
committed
DEP: commit uv.lock to repository and use locked env in CI
1 parent 728707e commit f4e6d1b

File tree

6 files changed

+847
-4
lines changed

6 files changed

+847
-4
lines changed

.github/bottleneck-action/action.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ runs:
44
using: composite
55
steps:
66
- name: Set up Python ${{ matrix.python-version }}
7-
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
7+
uses: astral-sh/setup-uv@v7
88
with:
99
python-version: ${{ matrix.python-version }}
10+
prune-cache: false
1011
- name: Install
1112
shell: bash
12-
run: pip install . -v --group test
13+
run: uv sync --no-editable --group test
1314

1415
- name: Test with pytest
1516
shell: bash
1617
run: |
1718
cd doc # avoid picking up bottleneck from the source dir
18-
pytest --pyargs bottleneck
19+
uv run --no-sync pytest --pyargs bottleneck

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,14 @@ updates:
1515
gha-patches:
1616
update-types:
1717
- patch
18+
19+
- package-ecosystem: uv
20+
directory: /
21+
schedule:
22+
interval: quarterly
23+
cooldown:
24+
default-days: 7
25+
groups:
26+
uv.lock-patches:
27+
update-types:
28+
- patch

.github/workflows/ci.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ jobs:
109109

110110
- name: Build wheels
111111
uses: pypa/cibuildwheel@298ed2fb2c105540f5ed055e8a6ad78d82dd3a7e # v3.3.1
112+
with:
113+
extras: uv
112114

113115
- name: Store wheel artifacts
114116
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
@@ -128,8 +130,13 @@ jobs:
128130
fetch-depth: 0
129131
persist-credentials: false
130132

133+
- name: Set up Python ${{ matrix.python-version }}
134+
uses: astral-sh/setup-uv@v7
135+
with:
136+
enable-cache: false
137+
131138
- name: Build sdist
132-
run: pipx run build --sdist
139+
run: uv build --sdist
133140

134141
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
135142
with:

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ repos:
1818
hooks:
1919
- id: zizmor
2020

21+
- repo: https://github.com/astral-sh/uv-pre-commit
22+
rev: 0.9.28
23+
hooks:
24+
- id: uv-lock
25+
2126
- repo: https://github.com/astral-sh/ruff-pre-commit
2227
rev: v0.14.13
2328
hooks:

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ addopts = "-l"
8787
filterwarnings = ["error"]
8888

8989
[tool.cibuildwheel]
90+
build-frontend = "build[uv]"
9091
skip = [
9192
"*_i686",
9293
"cp310-win_arm64", # no numpy wheels for this target

0 commit comments

Comments
 (0)