Skip to content

Commit 70f6bea

Browse files
committed
CI: Skip python setup when already installed
1 parent 871cbdd commit 70f6bea

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/pytests.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,17 @@ jobs:
3030
echo "cache_type=pip" >> $GITHUB_OUTPUT
3131
fi
3232
33+
- name: Check for Python
34+
id: python-check
35+
run: |
36+
if command -v python &/dev/null; then
37+
echo "python_installed=true" >> $GITHUB_OUTPUT
38+
else
39+
echo "python_installed=false" >> $GITHUB_OUTPUT
40+
fi
41+
3342
- name: Set up Python
43+
if: steps.python-check.outputs.python_installed == 'false'
3444
uses: actions/setup-python@v5
3545
with:
3646
python-version: '3.13'

0 commit comments

Comments
 (0)