Files
deskflow/.github/actions/init-python/action.yml

24 lines
760 B
YAML

# Important: Do not be tempted to cache the .venv dir (Python virtual environment).
# When the runner environment changes (e.g. Python is upgraded), the venv will need to be
# re-created. Trying to upgrade a venv can be complex and it's usually more practical re-create it.
# We don't save much time anyway by caching the venv so it's not worth the added complexity.
name: "Setup Python venv"
description: "Creates a Python virtual environment (venv)"
runs:
using: "composite"
steps:
- name: Setup Python venv
run: |
if [ "${{ runner.os }}" == "Windows" ]; then
python=python
else
python=python3
fi
echo "Setting up Python venv, bin=$python"
$python -m venv .venv
shell: bash