Skip to content

Commit 4c94b82

Browse files
chore: assert uv lock is locked in ci and pre-commit
see python-discord/bot#3416 for reference
1 parent 9176725 commit 4c94b82

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/lint-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
activate-environment: true
2020

2121
- name: Install dependencies
22-
run: uv sync --frozen --group lint --group test
22+
run: uv sync --locked --group lint --group test
2323

2424
# Start the database early to give it a chance to get ready before
2525
# we start running tests.

.pre-commit-config.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,16 @@ repos:
1212
args: [--markdown-linebreak-ext=md]
1313
- repo: local
1414
hooks:
15+
- id: uv-lock
16+
name: uv lock
17+
description: Checks the validity of the uv.lock file.
18+
entry: uv lock
19+
language: system
20+
files: ^(uv\.lock|pyproject\.toml|uv\.toml)$
21+
pass_filenames: false
1522
- id: ruff
1623
name: ruff
1724
description: This hook runs ruff within our project's environment.
18-
entry: uv run ruff check --force-exclude
25+
entry: uv run --frozen ruff check --force-exclude
1926
language: system
2027
types: [python]

0 commit comments

Comments
 (0)