Skip to content

Commit f16793c

Browse files
Handle HOME variable
1 parent 415cf38 commit f16793c

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/test.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,39 @@ 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: Install python
137+
uses: ./
138+
env:
139+
HOME: ""
140+
with:
141+
python-version: "3.13.3"
142+
143+
- name: Test installation
144+
run: |
145+
set -x
146+
147+
which python3
148+
which python
149+
150+
python3 --version
151+
python --version
152+
153+
python3 --version 2>&1 | grep -F "3.13.3"
154+
test "$(python3 -m pip --version)" = "$(pip3 --version)"
155+
156+
python --version 2>&1 | grep -F "3.13.3"
157+
test "$(python3 -m pip --version)" = "$(pip --version)"

0 commit comments

Comments
 (0)