Skip to content

Commit ad8d41f

Browse files
authored
chore: enforce uv lockfile consistency in CI and pre-commit (#1398)
* chore: enforce uv lockfile consistency in CI and pre-commit Add --locked flag to uv sync in CI to fail if uv.lock is out of sync, and add the uv-lock pre-commit hook to automatically keep uv.lock up to date when pyproject.toml changes. * chore: add missing --locked calls
1 parent acd9a8d commit ad8d41f

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ on:
3636
env:
3737
CARGO_TERM_COLOR: always
3838
RUST_BACKTRACE: 1
39+
UV_LOCKED: true
3940

4041
jobs:
4142
# ============================================

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ name: Test
2323
on:
2424
workflow_call:
2525

26+
env:
27+
UV_LOCKED: true
28+
2629
jobs:
2730
test-matrix:
2831
runs-on: ubuntu-latest

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,12 @@ repos:
5353
additional_dependencies:
5454
- tomli
5555

56+
- repo: https://github.com/astral-sh/uv-pre-commit
57+
# uv version.
58+
rev: 0.10.7
59+
hooks:
60+
# Update the uv lockfile
61+
- id: uv-lock
62+
5663
default_language_version:
5764
python: python3

0 commit comments

Comments
 (0)