File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -3,23 +3,34 @@ name: Python code quality
3
3
on :
4
4
push :
5
5
branches : [ main ]
6
+ paths :
7
+ - ' **.py'
8
+
6
9
pull_request :
7
10
branches : [ main ]
11
+ paths :
12
+ - ' **.py'
13
+
14
+ workflow_dispatch :
15
+
16
+ permissions :
17
+ contents : read
8
18
9
19
jobs :
10
- build :
20
+ checks-format-and-lint :
11
21
runs-on : ubuntu-latest
12
22
steps :
13
23
- uses : actions/checkout@v4
14
24
- name : Set up Python 3
15
25
uses : actions/setup-python@v5
16
26
with :
17
27
python-version : " 3.12"
28
+ cache : ' pip'
18
29
- name : Install dependencies
19
30
run : |
20
- python -m pip install --upgrade pip
21
- pip install -r requirements-dev.txt
31
+ python3 -m pip install --upgrade pip
32
+ python3 -m pip install ruff
22
33
- name : Lint with ruff
23
34
run : ruff check .
24
35
- name : Check formatting with ruff
25
- run : ruff format --check .
36
+ run : ruff format . --check
You can’t perform that action at this time.
0 commit comments