activate-environment isn't working for me. These are the steps I'm referring to:
- name: Install and cache uv
uses: astral-sh/setup-uv@v6
with:
activate-environment: true
enable-cache: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: Install the project/dependencies (uv)
run: uv sync --locked
env:
UV_PYTHON_DOWNLOADS: "never"
UV_SYSTEM_PYTHON: 1
The reason I'd like activate-environment to work is because I can then simplify this:
- name: Run pytest
run: |
source .venv/bin/activate
python -m pytest -rfE
shell: bash
to:
- name: Run pytest
run: python -m pytest -rfE
shell: bash
The former works fine but it would be nicer to not have to manually activate the virtualenv.