44name : Latest commit
55
66env :
7- CACHE_VERSION : 2
7+ CACHE_VERSION : 3
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
50- uses : plugwise/gh-actions/prepare-python-and-code@v1
49+ 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
@@ -68,12 +67,12 @@ jobs:
6867 persist-credentials : false
6968 - name : Restore cached environment
7069 id : cache-reuse
71- uses : plugwise/gh-actions/restore-venv@v1
70+ uses : plugwise/gh-actions/restore-venv@v2
7271 with :
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
@@ -104,25 +103,20 @@ jobs:
104103 uses : actions/checkout@v6
105104 - name : Restore cached environment
106105 id : cache-reuse
107- uses : plugwise/gh-actions/restore-venv@v1
106+ uses : plugwise/gh-actions/restore-venv@v2
108107 with :
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
117- - name : Biome lint
118- run : |
119- . venv-${{ needs.cache.outputs.python-version }}/bin/activate
120- mkdir -p ./tmp && curl -sL "https://github.com/biomejs/biome/releases/latest/download/biome-linux-x64" -o ./tmp/biome && chmod +x ./tmp/biome
121- pre-commit run --show-diff-on-failure --color=always --all-files --hook-stage manual biome
115+ prek run --show-diff-on-failure --color=always --all-files --hook-stage manual pylint
122116 - name : Lint markdown files
123117 run : |
124118 . venv-${{ needs.cache.outputs.python-version }}/bin/activate
125- pre-commit run --show-diff-on-failure --color=always --all-files --hook-stage manual markdownlint
119+ prek run --show-diff-on-failure --color=always --all-files --hook-stage manual markdownlint
126120
127121 pytest :
128122 runs-on : ubuntu-latest
@@ -144,13 +138,13 @@ jobs:
144138 python-version : ${{ matrix.python-version }}
145139 - name : Restore cached environment
146140 id : cache-reuse
147- uses : plugwise/gh-actions/restore-venv@v1
141+ uses : plugwise/gh-actions/restore-venv@v2
148142 with :
149143 fail-on-miss : false # First time create cache (if not already exists)
150144 cache-key : ${{ needs.cache.outputs.cache-key }}
151145 python-version : ${{ steps.python.outputs.python-version }} # Force to installed python minor
152146 venv-dir : ${{ env.VENV }}
153- precommit -home : ${{ env.PRE_COMMIT_HOME }}
147+ prek -home : ${{ env.PREK_HOME }}
154148 - name : Run all tests
155149 run : |
156150 . venv-${{ steps.python.outputs.python-version }}/bin/activate
@@ -177,12 +171,12 @@ jobs:
177171 persist-credentials : false
178172 - name : Restore cached environment
179173 id : cache-reuse
180- uses : plugwise/gh-actions/restore-venv@v1
174+ uses : plugwise/gh-actions/restore-venv@v2
181175 with :
182176 cache-key : ${{ needs.cache.outputs.cache-key }}
183177 python-version : ${{ needs.cache.outputs.python-version }}
184178 venv-dir : ${{ env.VENV }}
185- precommit -home : ${{ env.PRE_COMMIT_HOME }}
179+ prek -home : ${{ env.PREK_HOME }}
186180 - name : Run mypy
187181 run : |
188182 . venv-${{ needs.cache.outputs.python-version }}/bin/activate
@@ -222,12 +216,12 @@ jobs:
222216 uses : actions/checkout@v6
223217 - name : Restore cached environment
224218 id : cache-reuse
225- uses : plugwise/gh-actions/restore-venv@v1
219+ uses : plugwise/gh-actions/restore-venv@v2
226220 with :
227221 cache-key : ${{ needs.cache.outputs.cache-key }}
228222 python-version : ${{ needs.cache.outputs.python-version }}
229223 venv-dir : ${{ env.VENV }}
230- precommit -home : ${{ env.PRE_COMMIT_HOME }}
224+ prek -home : ${{ env.PREK_HOME }}
231225 - name : Download all coverage artifacts
232226 uses : actions/download-artifact@v7
233227 with :
@@ -304,12 +298,12 @@ jobs:
304298 uses : actions/checkout@v6
305299 - name : Restore cached environment
306300 id : cache-reuse
307- uses : plugwise/gh-actions/restore-venv@v1
301+ uses : plugwise/gh-actions/restore-venv@v2
308302 with :
309303 cache-key : ${{ needs.cache.outputs.cache-key }}
310304 python-version : ${{ needs.cache.outputs.python-version }}
311305 venv-dir : ${{ env.VENV }}
312- precommit -home : ${{ env.PRE_COMMIT_HOME }}
306+ prek -home : ${{ env.PREK_HOME }}
313307 - name : Run complexity report (click to view details)
314308 run : |
315309 . venv-${{ needs.cache.outputs.python-version }}/bin/activate
0 commit comments