-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (42 loc) · 1.16 KB
/
Copy pathpython-tools.yml
File metadata and controls
46 lines (42 loc) · 1.16 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
name: Python tools lint
# Lints the bundled Python recipes in client/tools (and dev.py) with ruff and
# pydoclint, using the configuration in pyproject.toml. Uses uv to run the dev
# tools without committing a lockfile or virtualenv.
on:
push:
paths:
- "client/tools/**"
- "dev.py"
- "pyproject.toml"
- ".github/workflows/python-tools.yml"
pull_request:
paths:
- "client/tools/**"
- "dev.py"
- "pyproject.toml"
- ".github/workflows/python-tools.yml"
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: '3.11'
cache: pip
- name: Install lint tools
run: |
python -m pip install \
"ruff==0.15.20" \
"pydoclint==0.9.1" \
"bandit==1.9.4"
- name: Ruff check
run: ruff check .
- name: Ruff format check
run: ruff format --check --diff .
- name: Pydoclint check
run: pydoclint .
- name: Bandit (medium+)
run: bandit -c _bandit.yaml -ll -r .