From 4b427c994833e1a2781c028ac80a11e1a6a64997 Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Wed, 14 Feb 2024 15:14:41 -0500 Subject: [PATCH] Factor venv activation into the venv creation step --- .github/workflows/alpine-test.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/alpine-test.yml b/.github/workflows/alpine-test.yml index 7634ea1d8..2c1eed391 100644 --- a/.github/workflows/alpine-test.yml +++ b/.github/workflows/alpine-test.yml @@ -44,24 +44,23 @@ jobs: # and cause subsequent tests to fail cat test/fixtures/.gitconfig >> ~/.gitconfig - - name: Create Python virtual environment + - name: Set up virtualenv run: | python -m venv .venv + . .venv/bin/activate + printf '%s=%s\n' 'PATH' "$PATH" 'VIRTUAL_ENV' "$VIRTUAL_ENV" >>"$GITHUB_ENV" - name: Update PyPA packages run: | # Get the latest pip, wheel, and prior to Python 3.12, setuptools. - . .venv/bin/activate python -m pip install -U pip $(pip freeze --all | grep -ow ^setuptools) wheel - name: Install project and test dependencies run: | - . .venv/bin/activate pip install ".[test]" - name: Show version and platform information run: | - . .venv/bin/activate uname -a command -v git python git version @@ -70,5 +69,4 @@ jobs: - name: Test with pytest run: | - . .venv/bin/activate pytest --color=yes -p no:sugar --instafail -vv