Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit39cd608

Browse files
committed
Put back explicit venv activation in Alpine Linux
`busybox sh` does not appear to read commands from a file whosepath is given as the value of `$ENV`, in this situation. I think Imay have misunderstood that; the documentation does not say muchabout it and maybe, in Almquist-style shells, it is only read byinteractive shells? I am not sure.This removes everything about `ENV` and activates the venv in eachstep where the venv should be used.The good news is that the technique did work fully in Cygwin: notonly did `BASH_ENV` work (which was not much in doubt), but usinga virtual environment for all steps that run test code on Cygwinfixed the problem and allowed all tests to pass. That seems to havebeen the reason I didn't reproduce the problem locally: on my localsystem I always use a venv in Cygwin since I would otherwise nothave adequate isolation.Thus, this commit changes only the Alpine workflow and not theCygwin workflow.
1 parent4aad37a commit39cd608

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎.github/workflows/alpine-test.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
-name:Prepare Alpine Linux
1818
run:|
1919
apk add sudo git git-daemon python3 py3-pip py3-virtualenv
20-
echo 'Defaults env_keep += "CIENVGITHUB_* RUNNER_*"' >/etc/sudoers.d/ci_env
20+
echo 'Defaults env_keep += "CI GITHUB_* RUNNER_*"' >/etc/sudoers.d/ci_env
2121
addgroup -g 127 docker
2222
adduser -D -u 1001 runner # TODO: Check if this still works on GHA as intended.
2323
adduser runner docker
@@ -47,19 +47,21 @@ jobs:
4747
-name:Set up virtualenv
4848
run:|
4949
python -m venv .venv
50-
echo 'ENV=.venv/bin/activate' >> "$GITHUB_ENV" # ENV (not BASH_ENV) for BusyBox sh.
5150
5251
-name:Update PyPA packages
5352
run:|
5453
# Get the latest pip, wheel, and prior to Python 3.12, setuptools.
54+
. .venv/bin/activate
5555
python -m pip install -U pip $(pip freeze --all | grep -ow ^setuptools) wheel
5656
5757
-name:Install project and test dependencies
5858
run:|
59+
. .venv/bin/activate
5960
pip install ".[test]"
6061
6162
-name:Show version and platform information
6263
run:|
64+
. .venv/bin/activate
6365
uname -a
6466
command -v git python
6567
git version
@@ -68,4 +70,5 @@ jobs:
6870
6971
-name:Test with pytest
7072
run:|
73+
. .venv/bin/activate
7174
pytest --color=yes -p no:sugar --instafail -vv

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp