Skip to content

Commit a0dee51

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

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/lint.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
22+
run: uv sync --locked
2323

2424
# Attempt to run the bot. Setting `IN_CI` to true, so bot.run() is never called.
2525
# This is to catch import and cog setup errors that may appear in PRs, to avoid crash loops if merged.

.pre-commit-config.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,17 @@ repos:
1111

1212
- repo: local
1313
hooks:
14+
- id: uv-lock
15+
name: uv-lock
16+
description: Checks the validity of the uv.lock file.
17+
entry: uv lock
18+
language: system
19+
files: ^(uv\.lock|pyproject\.toml|uv\.toml)$
20+
pass_filenames: false
1421
- id: ruff
1522
name: ruff
1623
description: Run ruff linting
17-
entry: uv run ruff check --force-exclude
24+
entry: uv run --locked ruff check --force-exclude
1825
language: system
1926
'types_or': [python, pyi]
2027
require_serial: true

0 commit comments

Comments
 (0)