forked from huggingface/kernels
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.21 KB
/
lint.yml
File metadata and controls
51 lines (44 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Lints
on: [push, pull_request]
jobs:
lint:
name: Run lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Run ruff
uses: astral-sh/ruff-action@v3
src: >-
kernels
black:
name: Run black check
runs-on: ubuntu-latest
env:
UV_PYTHON_PREFERENCE: only-managed
steps:
- uses: actions/checkout@v6
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v7
with:
python-version: 3.12
- name: Install black
run: uv pip install black
- name: Check formatting
run: |
uv run black --check kernels
validate-dependencies:
name: Validate python_depends.json
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Validate python_depends.json is up-to-date
run: |
python ( cd kernels && update_python_depends.py --validate ) || {
echo "Error: python_depends.json is out of date."
echo "Please run: python update_python_depends.py"
exit 1
}