Skip to content

Commit 99d5260

Browse files
Handle HOME variable
1 parent 415cf38 commit 99d5260

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/test.yml

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

0 commit comments

Comments
 (0)