Skip to content

Commit eff87cc

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

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/test.yml

+39
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,42 @@ 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+
env:
142+
HOME: ""
143+
with:
144+
python-version: "3.11.5"
145+
146+
- name: Test installation
147+
run: |
148+
set -x
149+
150+
which python3
151+
which python
152+
153+
python3 --version
154+
python --version
155+
156+
python3 --version 2>&1 | grep -F "3.11.5"
157+
test "$(python3 -m pip --version)" = "$(pip3 --version)"
158+
159+
python --version 2>&1 | grep -F "3.11.5"
160+
test "$(python3 -m pip --version)" = "$(pip --version)"

0 commit comments

Comments
 (0)