Skip to content

Commit 4cde2b7

Browse files
test: add test for fixing python version resolution order
1 parent 1c30e79 commit 4cde2b7

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/test.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,36 @@ jobs:
119119
120120
python --version 2>&1 | grep -F "3.11.5"
121121
test "$(python3 -m pip --version)" = "$(pip --version)"
122+
123+
test_python_resolution_order:
124+
runs-on: ubuntu-latest
125+
container: amazonlinux:2023
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: Create python version file
136+
run: |
137+
echo '3.12' > .python-version
138+
139+
- name: Install python
140+
uses: ./
141+
with:
142+
python-version: "3.13"
143+
144+
- name: Test python version
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.13"

0 commit comments

Comments
 (0)