Skip to content

Commit fc99348

Browse files
committed
Force venv consumption
1 parent a10eab2 commit fc99348

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

.github/workflows/verify.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
run: wget -O ha_pyproject.toml "https://raw.githubusercontent.com/home-assistant/core/refs/heads/dev/pyproject.toml"
3838
- name: Compute cache key
3939
id: set-key
40-
run: echo "cache-key=${{ runner.os }}-venv-cache-${{ env.CACHE_VERSION }}-${{ hashFiles('pyproject.toml', 'requirements_test.txt', '.pre-commit-config.yaml') }}" >> "$GITHUB_OUTPUT"
40+
run: echo "cache-key=${{ runner.os }}-${{ env.CACHE_VERSION }}-${{ hashFiles('pyproject.toml', 'requirements_test.txt', '.pre-commit-config.yaml') }}" >> "$GITHUB_OUTPUT"
4141

4242
# Prepare default python version environment
4343
prepare:
@@ -76,12 +76,12 @@ jobs:
7676
precommit-home: ${{ env.PRE_COMMIT_HOME }}
7777
- name: Ruff (with fix)
7878
run: |
79-
. venv/bin/activate
79+
. venv-${{ needs.cache.outputs.python-version }}/bin/activate
8080
ruff check plugwise/ tests/
8181
- name: If needed, commit ruff changes to the pull request
8282
if: failure()
8383
run: |
84-
. venv/bin/activate
84+
. venv-${{ needs.cache.outputs.python-version }}/bin/activate
8585
ruff format plugwise/ tests/
8686
git config --global user.name 'autoruff'
8787
git config --global user.email 'plugwise@users.noreply.github.com'
@@ -112,16 +112,16 @@ jobs:
112112
precommit-home: ${{ env.PRE_COMMIT_HOME }}
113113
- name: Verify commit
114114
run: |
115-
. venv/bin/activate
115+
. venv-${{ needs.cache.outputs.python-version }}/bin/activate
116116
pre-commit run --show-diff-on-failure --color=always --all-files --hook-stage manual pylint
117117
- name: Biome lint
118118
run: |
119-
. venv/bin/activate
119+
. venv-${{ needs.cache.outputs.python-version }}/bin/activate
120120
mkdir -p ./tmp && curl -sL "https://github.com/biomejs/biome/releases/latest/download/biome-linux-x64" -o ./tmp/biome && chmod +x ./tmp/biome
121121
pre-commit run --show-diff-on-failure --color=always --all-files --hook-stage manual biome
122122
- name: Lint markdown files
123123
run: |
124-
. venv/bin/activate
124+
. venv-${{ needs.cache.outputs.python-version }}/bin/activate
125125
pre-commit run --show-diff-on-failure --color=always --all-files --hook-stage manual markdownlint
126126
127127
pytest:
@@ -153,7 +153,7 @@ jobs:
153153
precommit-home: ${{ env.PRE_COMMIT_HOME }}
154154
- name: Run all tests
155155
run: |
156-
. venv/bin/activate
156+
. venv-${{ needs.cache.outputs.python-version }}/bin/activate
157157
pytest --log-level info tests/*.py --cov='.'
158158
- name: Upload coverage artifact
159159
uses: actions/upload-artifact@v4
@@ -185,7 +185,7 @@ jobs:
185185
precommit-home: ${{ env.PRE_COMMIT_HOME }}
186186
- name: Run mypy
187187
run: |
188-
. venv/bin/activate
188+
. venv-${{ needs.cache.outputs.python-version }}/bin/activate
189189
pip list | grep -i mypy
190190
mypy plugwise/
191191
@@ -236,7 +236,7 @@ jobs:
236236
path: ${{ github.workspace }}/artifacts
237237
- name: Combine coverage results
238238
run: |
239-
. venv/bin/activate
239+
. venv-${{ needs.cache.outputs.python-version }}/bin/activate
240240
coverage combine artifacts/.coverage*
241241
coverage report --fail-under=94
242242
coverage xml
@@ -312,6 +312,6 @@ jobs:
312312
precommit-home: ${{ env.PRE_COMMIT_HOME }}
313313
- name: Run complexity report (click to view details)
314314
run: |
315-
. venv/bin/activate
315+
. venv-${{ needs.cache.outputs.python-version }}/bin/activate
316316
echo "Showing complexity higher or equal to 'C'"
317317
radon cc plugwise/ tests/ -s -nc --no-assert

0 commit comments

Comments
 (0)