@@ -3,79 +3,55 @@ name: CI
33on :
44 pull_request :
55
6- env :
7- HATCH_VERSION : " v1.14.0" # keep in sync with deploy.yml
8-
96permissions :
107 pull-requests : write
118 contents : write
129
1310jobs :
14- format-black :
15- name : Format black
16- runs-on : ubuntu-latest
17- steps :
18- - uses : actions/checkout@v6
19- - uses : actions/setup-python@v6
20- with :
21- python-version : " 3.10"
22- - name : Install Hatch
23- run : pip install hatch==${{ env.HATCH_VERSION }}
24- - name : Run black
25- run : hatch run code-quality:format
26-
27-
28- mypy :
29- name : MyPy
11+ format :
12+ name : Format Code
3013 runs-on : ubuntu-latest
3114 steps :
32- - uses : actions/checkout@v6
33- - uses : actions/setup-python@v6
15+ - uses : actions/checkout@v5
16+ - name : Install uv
17+ uses : astral-sh/setup-uv@v5
3418 with :
19+ enable-cache : true
3520 python-version : " 3.10"
36- - name : Install Hatch
37- run : pip install hatch==${{ env.HATCH_VERSION }}
38- - name : Run mypy
39- run : hatch run code-quality:types
21+ - name : Install Dependencies
22+ run : uv sync --group code-quality
23+ - name : Run ruff format
24+ run : make format
4025
4126 lint :
4227 name : Lint Code
4328 runs-on : ubuntu-latest
4429 steps :
45- - uses : actions/checkout@v6
46- - uses : actions/setup-python@v6
30+ - uses : actions/checkout@v5
31+ - name : Install uv
32+ uses : astral-sh/setup-uv@v5
4733 with :
34+ enable-cache : true
4835 python-version : " 3.10"
49- - name : Install Hatch
50- run : pip install hatch==${{ env.HATCH_VERSION }}
51- - name : Run pylint
52- run : hatch run code-quality: lint
36+ - name : Install Dependencies
37+ run : uv sync --group code-quality
38+ - name : Run ruff check
39+ run : make lint
5340
54- isort :
55- name : Sort imports
41+ mypy :
42+ name : Type checking with mypy
5643 runs-on : ubuntu-latest
5744 steps :
58- - uses : actions/checkout@v6
59- - uses : actions/setup-python@v6
45+ - uses : actions/checkout@v5
46+ - name : Install uv
47+ uses : astral-sh/setup-uv@v5
6048 with :
49+ enable-cache : true
6150 python-version : " 3.10"
62- - name : Install Hatch
63- run : pip install hatch==${{ env.HATCH_VERSION }}
51+ - name : Install dependencies
52+ run : uv sync --group code-quality
6453 - name : Run mypy
65- run : hatch run code-quality:sort
66-
67- pydocstyle :
68- name : Check docstrings
69- runs-on : ubuntu-latest
70- steps :
71- - uses : actions/checkout@v6
72- - uses : actions/setup-python@v6
73- with :
74- python-version : " 3.10"
75- - name : Install Hatch
76- run : pip install hatch==${{ env.HATCH_VERSION }}
77- - name : Run pydocstyle
78- run : hatch run code-quality:docstrings
54+ run : make types
7955
8056 scan-for-secrets :
8157 name : Scan for secrets
@@ -101,13 +77,15 @@ jobs:
10177 with :
10278 # for coverage comment action
10379 fetch-depth : 1000
104- - uses : actions/setup-python@v6
80+ - name : Install uv
81+ uses : astral-sh/setup-uv@v5
10582 with :
83+ enable-cache : true
10684 python-version : " 3.10"
107- - name : Install Hatch
108- run : pip install hatch==${{ env.HATCH_VERSION }}
85+ - name : Install Dependencies
86+ run : uv sync --group test
10987 - name : Run unit tests
110- run : hatch run test:unit -with-cov
88+ run : make tests -with-cov
11189 - name : Coverage comment
11290 id : coverage_comment
11391 uses : py-cov-action/python-coverage-comment-action@e623398c19eb3853a5572d4a516e10b15b5cefbc
0 commit comments