1818 workflow_dispatch :
1919
2020jobs :
21- faildraft :
22- name : fail draft
23- if : github.event.pull_request.draft == true
24- runs-on : ubuntu-latest
25- steps :
26- - name : fail draft
27- run : |
28- exit 1
2921
3022 testing :
3123 name : ${{ matrix.os }} - ${{ matrix.python }}
@@ -36,11 +28,11 @@ jobs:
3628 fail-fast : false
3729 matrix :
3830 os : [ubuntu-latest, macos-latest, windows-latest]
39- python : ['3.10', '3.11', '3.12', " 3.13.0" ]
31+ python : ['3.10', '3.11', '3.12', ' 3.13', '3.14' ]
4032 include :
4133 - python : ' 3.10'
4234 run_lint : true
43- - python : ' 3.13.0 '
35+ - python : ' 3.13'
4436 run_doc : true
4537 run_lint : true
4638 - os : macos-latest
@@ -54,75 +46,54 @@ jobs:
5446 - name : Checkout repo from github
55475648
57- - name : Set up Python ${{ matrix.python }}
58- uses :
actions /setup-[email protected] 49+ - name : Install uv
50+ uses : astral-sh /setup-uv@v6
5951 with :
6052 python-version : ${{ matrix.python }}
53+ allow-prereleases : true
54+ enable-cache : true
6155
62- - name : Set venv path (NON Windows)
63- if : matrix.os != 'windows-latest'
64- run : |
65- echo "VIRTUAL_ENV=${{ github.workspace }}/venv" >> $GITHUB_ENV
66- echo ${{ github.workspace }}/venv/bin >> $GITHUB_PATH
67-
68- - name : Set venv path (Windows)
69- if : matrix.os == 'windows-latest'
70- run : |
71- echo "VIRTUAL_ENV=${{ github.workspace }}\\venv" >> $Env:GITHUB_ENV
72- echo "${{ github.workspace }}\\venv\\Scripts" >> $Env:GITHUB_PATH
73-
74- - name : Restore base Python virtual environment
75- id : cache-venv
76- 77- with :
78- path : ${{ env.VIRTUAL_ENV }}
79- key : >-
80- ${{ runner.os }}-${{ matrix.python }}-venv-${{
81- hashFiles('pyproject.toml') }}
82-
83- - name : Create venv (NEW CACHE)
84- if : steps.cache-venv.outputs.cache-hit != 'true'
56+ - name : Create virtualenv and sync dependencies
8557 run : |
86- python -m venv ${{ env.VIRTUAL_ENV }}
87- python -m pip install --upgrade pip
88- pip install -e ".[all]"
58+ uv sync --all-extras
8959
9060 - name : codespell
9161 if : matrix.run_doc == true
9262 run : |
93- codespell
63+ uv run codespell
9464
95- - name : dcoumentation
65+ - name : documentation
9666 if : matrix.run_doc == true
9767 run : |
98- cd doc; ./build_html
68+ source .venv/bin/activate
69+ cd doc
70+ ./build_html
71+ # this won't work on Windows, but we run_doc == False on Windows
9972
10073 - name : pylint
10174 if : matrix.run_lint == true
10275 run : |
103- pylint --recursive=y examples pymodbus test
76+ uv run pylint --recursive=y examples pymodbus test
10477
10578 - name : mypy
10679 if : matrix.run_lint == true
10780 run : |
108- mypy pymodbus examples
81+ uv run mypy pymodbus examples
10982
11083 - name : ruff
11184 if : matrix.run_lint == true
11285 run : |
113- ruff check .
86+ uv run ruff check .
11487
11588 - name : pytest
116- if : ${{ (matrix.os != 'ubuntu-latest') || (matrix.python != '3.13 ') }}
89+ if : ${{ (matrix.os != 'ubuntu-latest') || (matrix.python != '3.14.0 ') }}
11790 run : |
118- env
119- pytest
91+ uv run pytest
12092
12193 - name : pytest coverage
122- if : ${{ (matrix.os == 'ubuntu-latest') && (matrix.python == '3.13') }}
94+ if : ${{ (matrix.os == 'ubuntu-latest') && (matrix.python == '3.14.0') }}
12395 run : |
124- env
125- pytest --cov
96+ uv run pytest --cov
12697
12798 analyze :
12899 name : Analyze Python
@@ -131,13 +102,9 @@ jobs:
131102 timeout-minutes : 10
132103 steps :
133104134-
135105 - uses : github/codeql-action/init@v3
136106 with :
137107 languages : python
138-
139- - uses : github/codeql-action/autobuild@v3
140-
141108 - uses : github/codeql-action/analyze@v3
142109
143110 ci_complete :
0 commit comments