File tree 4 files changed +47
-59
lines changed
4 files changed +47
-59
lines changed Original file line number Diff line number Diff line change @@ -15,24 +15,29 @@ jobs:
15
15
runs-on : " ubuntu-latest"
16
16
name : Check code quality
17
17
steps :
18
- - uses : actions/checkout@v4
19
- - name : Set up uv
20
- # Install latest uv version using the installer
21
- run : curl -LsSf https://astral.sh/uv/install.sh | sh
22
- - name : " Set up Python"
18
+ - name : ⤵️ Checkout repository
19
+ uses : actions/checkout@v4
20
+
21
+ - name : 🏗 Install uv
22
+ uses : astral-sh/setup-uv@v2
23
+
24
+ - name : 🏗 Set up Python
23
25
uses : actions/setup-python@v5
24
26
with :
25
27
python-version-file : " .python-version"
26
- - name : Restore uv cache
28
+
29
+ - name : 🏗 Restore uv cache
27
30
uses : actions/cache@v4
28
31
with :
29
32
path : /tmp/.uv-cache
30
33
key : uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
31
34
restore-keys : |
32
35
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
33
36
uv-${{ runner.os }}
34
- - name : Install the project
37
+
38
+ - name : 🏗 Install the project
35
39
run : uv sync --locked --dev
40
+
36
41
# Following steps cannot run by pre-commit.ci as repo = local
37
42
- name : Run mypy
38
43
run : uv run mypy deebot_client/
Original file line number Diff line number Diff line change @@ -19,19 +19,19 @@ jobs:
19
19
permissions :
20
20
id-token : write
21
21
steps :
22
- - name : 📥 Checkout the repository
22
+ - name : ⤵️ Checkout repository
23
23
uses : actions/checkout@v4
24
24
25
- - name : Set up uv
25
+ - name : 🏗 Install uv
26
26
# Install latest uv version using the installer
27
27
run : curl -LsSf https://astral.sh/uv/install.sh | sh
28
28
29
- - name : " Set up Python"
29
+ - name : 🏗 Set up Python
30
30
uses : actions/setup-python@v5
31
31
with :
32
32
python-version-file : " .python-version"
33
33
34
- - name : Restore uv cache
34
+ - name : 🏗 Restore uv cache
35
35
uses : actions/cache@v4
36
36
with :
37
37
path : /tmp/.uv-cache
@@ -40,13 +40,20 @@ jobs:
40
40
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
41
41
uv-${{ runner.os }}
42
42
43
- - name : Install the project
43
+ - name : 🏗 Install the project
44
44
run : uv sync --dev --locked
45
45
46
46
- name : 📦 Build package
47
- run : |
48
- . .venv/bin/activate
49
- python -m build
47
+ run : uv build
50
48
51
- - name : 📤 Publish package
49
+ - name : 🚀 Publish package
52
50
uses : pypa/gh-action-pypi-publish@release/v1
51
+ with :
52
+ verbose : true
53
+ print-hash : true
54
+
55
+ - name : ✍️ Sign published artifacts
56
+
57
+ with :
58
+ inputs : ./dist/*.tar.gz ./dist/*.whl
59
+ release-signing-artifacts : true
Original file line number Diff line number Diff line change @@ -36,6 +36,24 @@ dynamic = ["version"]
36
36
"Source Code" = " https://github.com/DeebotUniverse/client.py"
37
37
"Bug Reports" = " https://github.com/DeebotUniverse/client.py/issues"
38
38
39
+ [tool .uv ]
40
+ dev-dependencies = [
41
+ " mypy==1.11.2" ,
42
+ " pre-commit==3.8.0" ,
43
+ " pycountry==24.6.1" ,
44
+ " pylint==3.2.7" ,
45
+ " pytest-asyncio==0.24.0" ,
46
+ " pytest-cov==5.0.0" ,
47
+ " pytest-docker-fixtures==1.3.19" ,
48
+ " pytest-timeout==2.3.1" ,
49
+ " pytest==8.3.3" ,
50
+ " testfixtures==8.3.0" ,
51
+ " types-cachetools>=5.5.0.20240820" ,
52
+ " types-mock>=5.1.0.20240425" ,
53
+ " types-pillow>=10.2.0.20240822" ,
54
+ ]
55
+
56
+
39
57
[tool .hatch .build .targets .sdist ]
40
58
include = [
41
59
" /deebot_client" ,
@@ -176,20 +194,3 @@ overgeneral-exceptions = [
176
194
" builtins.Exception" ,
177
195
]
178
196
179
- [tool .uv ]
180
- dev-dependencies = [
181
- " build>=1.2.1" ,
182
- " mypy==1.11.2" ,
183
- " pre-commit==3.8.0" ,
184
- " pycountry==24.6.1" ,
185
- " pylint==3.2.7" ,
186
- " pytest-asyncio==0.24.0" ,
187
- " pytest-cov==5.0.0" ,
188
- " pytest-docker-fixtures==1.3.19" ,
189
- " pytest-timeout==2.3.1" ,
190
- " pytest==8.3.3" ,
191
- " testfixtures==8.3.0" ,
192
- " types-cachetools>=5.5.0.20240820" ,
193
- " types-mock>=5.1.0.20240425" ,
194
- " types-pillow>=10.2.0.20240822" ,
195
- ]
You can’t perform that action at this time.
0 commit comments