@@ -40,12 +40,19 @@ jobs:
4040 - os : ubuntu-latest
4141 platform : linux
4242 ext : " "
43+ # Use Python versions available in python-build-standalone for Linux
44+ version1 : " 3.11.11"
45+ version2 : " 3.12.8"
4346 - os : macos-latest
4447 platform : macos
4548 ext : " "
49+ version1 : " 3.11.11"
50+ version2 : " 3.12.8"
4651 - os : windows-latest
4752 platform : windows
4853 ext : " .exe"
54+ version1 : " 3.11.11"
55+ version2 : " 3.12.8"
4956 env :
5057 # Run tests from a directory outside the repo to avoid picking up .dtvem/runtimes.json
5158 TEST_WORKSPACE : ${{ github.workspace }}/../dtvem-test-workspace
@@ -97,26 +104,43 @@ jobs:
97104 cp ./dist/dtvem-shim${{ matrix.ext }} "$TEST_WORKSPACE/"
98105 shell : bash
99106
100- - name : " List available versions"
107+ - name : " List available versions and verify test versions exist "
101108 run : |
102109 cd "$TEST_WORKSPACE"
103110 echo "## Python Available Versions" >> $GITHUB_STEP_SUMMARY
104111 echo '```' >> $GITHUB_STEP_SUMMARY
105- ./dtvem${{ matrix.ext }} list-all python | head -20 >> $GITHUB_STEP_SUMMARY || true
112+ AVAILABLE=$(./dtvem${{ matrix.ext }} list-all python)
113+ echo "$AVAILABLE" | head -20 >> $GITHUB_STEP_SUMMARY || true
106114 echo '```' >> $GITHUB_STEP_SUMMARY
107115 echo "" >> $GITHUB_STEP_SUMMARY
116+
117+ # Verify test versions are available
118+ echo "Verifying test versions are available..."
119+ if ! echo "$AVAILABLE" | grep -q "${{ matrix.version1 }}"; then
120+ echo "ERROR: Version ${{ matrix.version1 }} not found in available versions"
121+ echo "Available versions:"
122+ echo "$AVAILABLE"
123+ exit 1
124+ fi
125+ if ! echo "$AVAILABLE" | grep -q "${{ matrix.version2 }}"; then
126+ echo "ERROR: Version ${{ matrix.version2 }} not found in available versions"
127+ echo "Available versions:"
128+ echo "$AVAILABLE"
129+ exit 1
130+ fi
131+ echo "✓ Both versions ${{ matrix.version1 }} and ${{ matrix.version2 }} are available"
108132 shell : bash
109133
110- - name : " Install version ${{ inputs .version1 || '3.11.9' }}"
134+ - name : " Install version ${{ matrix .version1 }}"
111135 run : |
112136 cd "$TEST_WORKSPACE"
113- ./dtvem${{ matrix.ext }} install python ${{ inputs .version1 || '3.11.9' }}
137+ ./dtvem${{ matrix.ext }} install python ${{ matrix .version1 }}
114138 shell : bash
115139
116- - name : " Install version ${{ inputs .version2 || '3.12.7' }}"
140+ - name : " Install version ${{ matrix .version2 }}"
117141 run : |
118142 cd "$TEST_WORKSPACE"
119- ./dtvem${{ matrix.ext }} install python ${{ inputs .version2 || '3.12.7' }}
143+ ./dtvem${{ matrix.ext }} install python ${{ matrix .version2 }}
120144 shell : bash
121145
122146 - name : " List installed versions"
@@ -129,19 +153,19 @@ jobs:
129153 echo "" >> $GITHUB_STEP_SUMMARY
130154 shell : bash
131155
132- - name : " Set global version to ${{ inputs .version1 || '3.11.9' }}"
156+ - name : " Set global version to ${{ matrix .version1 }}"
133157 run : |
134158 cd "$TEST_WORKSPACE"
135- ./dtvem${{ matrix.ext }} global python ${{ inputs .version1 || '3.11.9' }}
159+ ./dtvem${{ matrix.ext }} global python ${{ matrix .version1 }}
136160 shell : bash
137161
138162 - name : " Verify global version via current"
139163 run : |
140164 cd "$TEST_WORKSPACE"
141165 CURRENT=$(./dtvem${{ matrix.ext }} current python --no-install)
142166 echo "Current python version: $CURRENT"
143- if [[ "$CURRENT" != *"${{ inputs .version1 || '3.11.9' }}"* ]]; then
144- echo "ERROR: Expected ${{ inputs .version1 || '3.11.9' }} but got $CURRENT"
167+ if [[ "$CURRENT" != *"${{ matrix .version1 }}"* ]]; then
168+ echo "ERROR: Expected ${{ matrix .version1 }} but got $CURRENT"
145169 exit 1
146170 fi
147171 shell : bash
@@ -151,25 +175,25 @@ jobs:
151175 cd "$TEST_WORKSPACE"
152176 PYTHON_VERSION=$(python --version)
153177 echo "Python version from shim: $PYTHON_VERSION"
154- if [[ "$PYTHON_VERSION" != *"${{ inputs .version1 || '3.11.9' }}"* ]]; then
155- echo "ERROR: Expected Python ${{ inputs .version1 || '3.11.9' }} but got $PYTHON_VERSION"
178+ if [[ "$PYTHON_VERSION" != *"${{ matrix .version1 }}"* ]]; then
179+ echo "ERROR: Expected Python ${{ matrix .version1 }} but got $PYTHON_VERSION"
156180 exit 1
157181 fi
158182 shell : bash
159183
160- - name : " Switch global version to ${{ inputs .version2 || '3.12.7' }}"
184+ - name : " Switch global version to ${{ matrix .version2 }}"
161185 run : |
162186 cd "$TEST_WORKSPACE"
163- ./dtvem${{ matrix.ext }} global python ${{ inputs .version2 || '3.12.7' }}
187+ ./dtvem${{ matrix.ext }} global python ${{ matrix .version2 }}
164188 shell : bash
165189
166190 - name : " Verify version switched"
167191 run : |
168192 cd "$TEST_WORKSPACE"
169193 PYTHON_VERSION=$(python --version)
170194 echo "Python version from shim: $PYTHON_VERSION"
171- if [[ "$PYTHON_VERSION" != *"${{ inputs .version2 || '3.12.7' }}"* ]]; then
172- echo "ERROR: Expected Python ${{ inputs .version2 || '3.12.7' }} but got $PYTHON_VERSION"
195+ if [[ "$PYTHON_VERSION" != *"${{ matrix .version2 }}"* ]]; then
196+ echo "ERROR: Expected Python ${{ matrix .version2 }} but got $PYTHON_VERSION"
173197 exit 1
174198 fi
175199 shell : bash
@@ -179,17 +203,17 @@ jobs:
179203 cd "$TEST_WORKSPACE"
180204 mkdir -p test-project
181205 cd test-project
182- ../dtvem${{ matrix.ext }} local python ${{ inputs .version1 || '3.11.9' }}
206+ ../dtvem${{ matrix.ext }} local python ${{ matrix .version1 }}
183207 CURRENT=$(../dtvem${{ matrix.ext }} current python --no-install)
184208 echo "Current python version in test-project: $CURRENT"
185- if [[ "$CURRENT" != *"${{ inputs .version1 || '3.11.9' }}"* ]]; then
186- echo "ERROR: Local override failed. Expected ${{ inputs .version1 || '3.11.9' }} but got $CURRENT"
209+ if [[ "$CURRENT" != *"${{ matrix .version1 }}"* ]]; then
210+ echo "ERROR: Local override failed. Expected ${{ matrix .version1 }} but got $CURRENT"
187211 exit 1
188212 fi
189213 PYTHON_VERSION=$(python --version)
190214 echo "Python version from shim in test-project: $PYTHON_VERSION"
191- if [[ "$PYTHON_VERSION" != *"${{ inputs .version1 || '3.11.9' }}"* ]]; then
192- echo "ERROR: Expected Python ${{ inputs .version1 || '3.11.9' }} but got $PYTHON_VERSION"
215+ if [[ "$PYTHON_VERSION" != *"${{ matrix .version1 }}"* ]]; then
216+ echo "ERROR: Expected Python ${{ matrix .version1 }} but got $PYTHON_VERSION"
193217 exit 1
194218 fi
195219 shell : bash
@@ -231,16 +255,16 @@ jobs:
231255 echo "" >> $GITHUB_STEP_SUMMARY
232256 shell : bash
233257
234- - name : " Switch global back to ${{ inputs .version1 || '3.11.9' }} before uninstall"
258+ - name : " Switch global back to ${{ matrix .version1 }} before uninstall"
235259 run : |
236260 cd "$TEST_WORKSPACE"
237- ./dtvem${{ matrix.ext }} global python ${{ inputs .version1 || '3.11.9' }}
261+ ./dtvem${{ matrix.ext }} global python ${{ matrix .version1 }}
238262 shell : bash
239263
240- - name : " Uninstall version ${{ inputs .version2 || '3.12.7' }}"
264+ - name : " Uninstall version ${{ matrix .version2 }}"
241265 run : |
242266 cd "$TEST_WORKSPACE"
243- ./dtvem${{ matrix.ext }} uninstall python ${{ inputs .version2 || '3.12.7' }} --yes
267+ ./dtvem${{ matrix.ext }} uninstall python ${{ matrix .version2 }} --yes
244268 shell : bash
245269
246270 - name : " Verify uninstall"
@@ -249,8 +273,8 @@ jobs:
249273 LIST_OUTPUT=$(./dtvem${{ matrix.ext }} list python)
250274 echo "Installed versions after uninstall:"
251275 echo "$LIST_OUTPUT"
252- if [[ "$LIST_OUTPUT" == *"${{ inputs .version2 || '3.12.7' }}"* ]]; then
253- echo "ERROR: Version ${{ inputs .version2 || '3.12.7' }} should have been uninstalled"
276+ if [[ "$LIST_OUTPUT" == *"${{ matrix .version2 }}"* ]]; then
277+ echo "ERROR: Version ${{ matrix .version2 }} should have been uninstalled"
254278 exit 1
255279 fi
256280 shell : bash
0 commit comments