Skip to content

Commit 799849e

Browse files
Add test harness to remove HOME variable
1 parent 7c22c8a commit 799849e

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/test.yml

+37
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,40 @@ jobs:
119119
120120
python --version 2>&1 | grep -F "3.11.5"
121121
test "$(python3 -m pip --version)" = "$(pip --version)"
122+
123+
test_python_install_without_home_directory:
124+
runs-on: ubuntu-latest
125+
container: amazonlinux:2
126+
steps:
127+
- name: Setup runner
128+
run: |
129+
yum install -y git sudo tar gzip which
130+
131+
- name: Checkout
132+
run: |
133+
git clone --depth 1 -b "${GITHUB_HEAD_REF:-$GITHUB_REF_NAME}" "https://github.com/${GITHUB_REPOSITORY}.git" .
134+
135+
- name: Remove $HOME
136+
run: |
137+
unset HOME
138+
139+
- name: Install python
140+
uses: ./
141+
with:
142+
python-version: "3.11.5"
143+
144+
- name: Test installation
145+
run: |
146+
set -x
147+
148+
which python3
149+
which python
150+
151+
python3 --version
152+
python --version
153+
154+
python3 --version 2>&1 | grep -F "3.11.5"
155+
test "$(python3 -m pip --version)" = "$(pip3 --version)"
156+
157+
python --version 2>&1 | grep -F "3.11.5"
158+
test "$(python3 -m pip --version)" = "$(pip --version)"

0 commit comments

Comments
 (0)