Skip to content

Commit 4b427c9

Browse files
committed
Factor venv activation into the venv creation step
1 parent bad545a commit 4b427c9

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

.github/workflows/alpine-test.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -44,24 +44,23 @@ jobs:
4444
# and cause subsequent tests to fail
4545
cat test/fixtures/.gitconfig >> ~/.gitconfig
4646
47-
- name: Create Python virtual environment
47+
- name: Set up virtualenv
4848
run: |
4949
python -m venv .venv
50+
. .venv/bin/activate
51+
printf '%s=%s\n' 'PATH' "$PATH" 'VIRTUAL_ENV' "$VIRTUAL_ENV" >>"$GITHUB_ENV"
5052
5153
- name: Update PyPA packages
5254
run: |
5355
# Get the latest pip, wheel, and prior to Python 3.12, setuptools.
54-
. .venv/bin/activate
5556
python -m pip install -U pip $(pip freeze --all | grep -ow ^setuptools) wheel
5657
5758
- name: Install project and test dependencies
5859
run: |
59-
. .venv/bin/activate
6060
pip install ".[test]"
6161
6262
- name: Show version and platform information
6363
run: |
64-
. .venv/bin/activate
6564
uname -a
6665
command -v git python
6766
git version
@@ -70,5 +69,4 @@ jobs:
7069
7170
- name: Test with pytest
7271
run: |
73-
. .venv/bin/activate
7472
pytest --color=yes -p no:sugar --instafail -vv

0 commit comments

Comments
 (0)