Skip to content

Commit a9ae382

Browse files
committed
check uv lockfile
1 parent ce06b62 commit a9ae382

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

.github/workflows/check-lock.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Check uv.lock
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "pyproject.toml"
7+
- "uv.lock"
8+
push:
9+
paths:
10+
- "pyproject.toml"
11+
- "uv.lock"
12+
13+
jobs:
14+
check-lock:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Install uv
20+
run: |
21+
curl -LsSf https://astral.sh/uv/install.sh | sh
22+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
23+
24+
- name: Check uv.lock is up to date
25+
run: uv lock --check

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,12 @@ repos:
1313
- id: ruff-format
1414
- id: ruff
1515
args: [--fix, --exit-non-zero-on-fix]
16+
17+
- repo: local
18+
hooks:
19+
- id: uv-lock-check
20+
name: Check uv.lock is up to date
21+
entry: uv lock --check
22+
language: system
23+
files: ^(pyproject\.toml|uv\.lock)$
24+
pass_filenames: false

0 commit comments

Comments
 (0)