44name : Latest commit
55
66env :
7- CACHE_VERSION : 1
7+ CACHE_VERSION : 2
88 DEFAULT_PYTHON : " 3.14"
9- PRE_COMMIT_HOME : ~/.cache/pre-commit
109 VENV : venv
1110
1211on :
@@ -45,15 +44,15 @@ jobs:
4544 needs : cache
4645 name : Prepare
4746 steps :
48- - name : Prepare code checkout and python/pre-commit setup
47+ - name : Prepare code checkout and python/prek/ pre-commit setup
4948 id : cache-reuse
5049 uses : plugwise/gh-actions/prepare-python-and-code@v2
5150 with :
5251 cache-key : ${{ needs.cache.outputs.cache-key }}
5352 fail-on-miss : false # First time create cache (if not already exists)
5453 python-version : ${{ needs.cache.outputs.python-version }}
5554 venv-dir : ${{ env.VENV }}
56- precommit -home : ${{ env.PRE_COMMIT_HOME }}
55+ prek -home : ${{ env.PREK_HOME }}
5756
5857 ruff :
5958 runs-on : ubuntu-latest
7372 cache-key : ${{ needs.cache.outputs.cache-key }}
7473 python-version : ${{ needs.cache.outputs.python-version }}
7574 venv-dir : ${{ env.VENV }}
76- precommit -home : ${{ env.PRE_COMMIT_HOME }}
75+ prek -home : ${{ env.PREK_HOME }}
7776 - name : Ruff (with fix)
7877 run : |
7978 . venv-${{ needs.cache.outputs.python-version }}/bin/activate
@@ -109,11 +108,11 @@ jobs:
109108 cache-key : ${{ needs.cache.outputs.cache-key }}
110109 python-version : ${{ needs.cache.outputs.python-version }}
111110 venv-dir : ${{ env.VENV }}
112- precommit -home : ${{ env.PRE_COMMIT_HOME }}
111+ prek -home : ${{ env.PREK_HOME }}
113112 - name : Verify commit
114113 run : |
115114 . venv-${{ needs.cache.outputs.python-version }}/bin/activate
116- pre-commit run --show-diff-on-failure --color=always --all-files --hook-stage manual pylint
115+ prek run --show-diff-on-failure --color=always --all-files --hook-stage manual pylint
117116# - name: Biome lint
118117# run: |
119118# . venv-${{ needs.cache.outputs.python-version }}/bin/activate
@@ -122,7 +121,7 @@ jobs:
122121 - name : Lint markdown files
123122 run : |
124123 . venv-${{ needs.cache.outputs.python-version }}/bin/activate
125- pre-commit run --show-diff-on-failure --color=always --all-files --hook-stage manual markdownlint
124+ pre-commit run --show-diff-on-failure --color=always --all-files --hook-stage manual pymarkdown
126125
127126 pytest :
128127 runs-on : ubuntu-latest
@@ -150,7 +149,7 @@ jobs:
150149 cache-key : ${{ needs.cache.outputs.cache-key }}
151150 python-version : ${{ steps.python.outputs.python-version }} # Force to installed python minor
152151 venv-dir : ${{ env.VENV }}
153- precommit -home : ${{ env.PRE_COMMIT_HOME }}
152+ prek -home : ${{ env.PREK_HOME }}
154153 - name : Run all tests
155154 run : |
156155 . venv-${{ steps.python.outputs.python-version }}/bin/activate
@@ -183,11 +182,11 @@ jobs:
183182 cache-key : ${{ needs.cache.outputs.cache-key }}
184183 python-version : ${{ needs.cache.outputs.python-version }}
185184 venv-dir : ${{ env.VENV }}
186- precommit -home : ${{ env.PRE_COMMIT_HOME }}
185+ prek -home : ${{ env.PREK_HOME }}
187186 - name : Run mypy
188187 run : |
189188 . venv-${{ needs.cache.outputs.python-version }}/bin/activate
190- pip list | grep -i mypy
189+ uv pip list | grep -i mypy
191190 mypy plugwise_usb/
192191
193192 # Check shellscripts
@@ -228,7 +227,7 @@ jobs:
228227 cache-key : ${{ needs.cache.outputs.cache-key }}
229228 python-version : ${{ needs.cache.outputs.python-version }}
230229 venv-dir : ${{ env.VENV }}
231- precommit -home : ${{ env.PRE_COMMIT_HOME }}
230+ prek -home : ${{ env.PREK_HOME }}
232231 - name : Download all coverage artifacts
233232 uses : actions/download-artifact@v8
234233 with :
@@ -316,7 +315,7 @@ jobs:
316315 cache-key : ${{ needs.cache.outputs.cache-key }}
317316 python-version : ${{ needs.cache.outputs.python-version }}
318317 venv-dir : ${{ env.VENV }}
319- precommit -home : ${{ env.PRE_COMMIT_HOME }}
318+ prek -home : ${{ env.PREK_HOME }}
320319 - name : Run complexity report (click to view details)
321320 run : |
322321 . venv-${{ needs.cache.outputs.python-version }}/bin/activate
0 commit comments