From 4c94b829e15ea5fdc76988369b492a81c140f4a2 Mon Sep 17 00:00:00 2001 From: onerandomusername Date: Tue, 21 Oct 2025 17:06:02 -0400 Subject: chore: assert uv lock is locked in ci and pre-commit see https://github.com/python-discord/bot/pull/3416 for reference --- .github/workflows/lint-test.yaml | 2 +- .pre-commit-config.yaml | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 159e6fd7..54be8e6c 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -19,7 +19,7 @@ jobs: activate-environment: true - name: Install dependencies - run: uv sync --frozen --group lint --group test + run: uv sync --locked --group lint --group test # Start the database early to give it a chance to get ready before # we start running tests. diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index acae72fd..7f379ad0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,9 +12,16 @@ repos: args: [--markdown-linebreak-ext=md] - repo: local hooks: + - id: uv-lock + name: uv lock + description: Checks the validity of the uv.lock file. + entry: uv lock + language: system + files: ^(uv\.lock|pyproject\.toml|uv\.toml)$ + pass_filenames: false - id: ruff name: ruff description: This hook runs ruff within our project's environment. - entry: uv run ruff check --force-exclude + entry: uv run --frozen ruff check --force-exclude language: system types: [python] -- cgit v1.2.3