Skip to content

Commit e9daa3e

Browse files
committed
fix(ci): add ruby provider to shim and use matrix-based versions
Multiple fixes: 1. Add Ruby provider import to shim binary - Shim was missing Ruby provider registration - Caused "runtime provider 'ruby' not found" on Windows 2. Use matrix-based versions for Python and Ruby tests - Different platforms have different version availability - Ruby: Linux uses 3.2.x (available in ruby-builder for ubuntu-22.04) - Ruby: macOS/Windows use 3.3.6 and 3.4.1 - Python: Use 3.11.11 and 3.12.8 (available across all platforms)
1 parent 5655b7a commit e9daa3e

4 files changed

Lines changed: 153 additions & 81 deletions

File tree

.github/workflows/integration-test-node.yml

Lines changed: 50 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,18 @@ jobs:
4040
- os: ubuntu-latest
4141
platform: linux
4242
ext: ""
43+
version1: "20.18.0"
44+
version2: "22.11.0"
4345
- os: macos-latest
4446
platform: macos
4547
ext: ""
48+
version1: "20.18.0"
49+
version2: "22.11.0"
4650
- os: windows-latest
4751
platform: windows
4852
ext: ".exe"
53+
version1: "20.18.0"
54+
version2: "22.11.0"
4955
env:
5056
# Run tests from a directory outside the repo to avoid picking up .dtvem/runtimes.json
5157
TEST_WORKSPACE: ${{ github.workspace }}/../dtvem-test-workspace
@@ -97,26 +103,43 @@ jobs:
97103
cp ./dist/dtvem-shim${{ matrix.ext }} "$TEST_WORKSPACE/"
98104
shell: bash
99105

100-
- name: "List available versions"
106+
- name: "List available versions and verify test versions exist"
101107
run: |
102108
cd "$TEST_WORKSPACE"
103109
echo "## Node.js Available Versions" >> $GITHUB_STEP_SUMMARY
104110
echo '```' >> $GITHUB_STEP_SUMMARY
105-
./dtvem${{ matrix.ext }} list-all node | head -20 >> $GITHUB_STEP_SUMMARY || true
111+
AVAILABLE=$(./dtvem${{ matrix.ext }} list-all node)
112+
echo "$AVAILABLE" | head -20 >> $GITHUB_STEP_SUMMARY || true
106113
echo '```' >> $GITHUB_STEP_SUMMARY
107114
echo "" >> $GITHUB_STEP_SUMMARY
115+
116+
# Verify test versions are available
117+
echo "Verifying test versions are available..."
118+
if ! echo "$AVAILABLE" | grep -q "${{ matrix.version1 }}"; then
119+
echo "ERROR: Version ${{ matrix.version1 }} not found in available versions"
120+
echo "Available versions:"
121+
echo "$AVAILABLE"
122+
exit 1
123+
fi
124+
if ! echo "$AVAILABLE" | grep -q "${{ matrix.version2 }}"; then
125+
echo "ERROR: Version ${{ matrix.version2 }} not found in available versions"
126+
echo "Available versions:"
127+
echo "$AVAILABLE"
128+
exit 1
129+
fi
130+
echo "✓ Both versions ${{ matrix.version1 }} and ${{ matrix.version2 }} are available"
108131
shell: bash
109132

110-
- name: "Install version ${{ inputs.version1 || '20.18.0' }}"
133+
- name: "Install version ${{ matrix.version1 }}"
111134
run: |
112135
cd "$TEST_WORKSPACE"
113-
./dtvem${{ matrix.ext }} install node ${{ inputs.version1 || '20.18.0' }}
136+
./dtvem${{ matrix.ext }} install node ${{ matrix.version1 }}
114137
shell: bash
115138

116-
- name: "Install version ${{ inputs.version2 || '22.11.0' }}"
139+
- name: "Install version ${{ matrix.version2 }}"
117140
run: |
118141
cd "$TEST_WORKSPACE"
119-
./dtvem${{ matrix.ext }} install node ${{ inputs.version2 || '22.11.0' }}
142+
./dtvem${{ matrix.ext }} install node ${{ matrix.version2 }}
120143
shell: bash
121144

122145
- name: "List installed versions"
@@ -129,19 +152,19 @@ jobs:
129152
echo "" >> $GITHUB_STEP_SUMMARY
130153
shell: bash
131154

132-
- name: "Set global version to ${{ inputs.version1 || '20.18.0' }}"
155+
- name: "Set global version to ${{ matrix.version1 }}"
133156
run: |
134157
cd "$TEST_WORKSPACE"
135-
./dtvem${{ matrix.ext }} global node ${{ inputs.version1 || '20.18.0' }}
158+
./dtvem${{ matrix.ext }} global node ${{ matrix.version1 }}
136159
shell: bash
137160

138161
- name: "Verify global version via current"
139162
run: |
140163
cd "$TEST_WORKSPACE"
141164
CURRENT=$(./dtvem${{ matrix.ext }} current node --no-install)
142165
echo "Current node version: $CURRENT"
143-
if [[ "$CURRENT" != *"${{ inputs.version1 || '20.18.0' }}"* ]]; then
144-
echo "ERROR: Expected ${{ inputs.version1 || '20.18.0' }} but got $CURRENT"
166+
if [[ "$CURRENT" != *"${{ matrix.version1 }}"* ]]; then
167+
echo "ERROR: Expected ${{ matrix.version1 }} but got $CURRENT"
145168
exit 1
146169
fi
147170
shell: bash
@@ -151,25 +174,25 @@ jobs:
151174
cd "$TEST_WORKSPACE"
152175
NODE_VERSION=$(node --version)
153176
echo "Node version from shim: $NODE_VERSION"
154-
if [[ "$NODE_VERSION" != *"${{ inputs.version1 || '20.18.0' }}"* ]]; then
155-
echo "ERROR: Expected v${{ inputs.version1 || '20.18.0' }} but got $NODE_VERSION"
177+
if [[ "$NODE_VERSION" != *"${{ matrix.version1 }}"* ]]; then
178+
echo "ERROR: Expected v${{ matrix.version1 }} but got $NODE_VERSION"
156179
exit 1
157180
fi
158181
shell: bash
159182

160-
- name: "Switch global version to ${{ inputs.version2 || '22.11.0' }}"
183+
- name: "Switch global version to ${{ matrix.version2 }}"
161184
run: |
162185
cd "$TEST_WORKSPACE"
163-
./dtvem${{ matrix.ext }} global node ${{ inputs.version2 || '22.11.0' }}
186+
./dtvem${{ matrix.ext }} global node ${{ matrix.version2 }}
164187
shell: bash
165188

166189
- name: "Verify version switched"
167190
run: |
168191
cd "$TEST_WORKSPACE"
169192
NODE_VERSION=$(node --version)
170193
echo "Node version from shim: $NODE_VERSION"
171-
if [[ "$NODE_VERSION" != *"${{ inputs.version2 || '22.11.0' }}"* ]]; then
172-
echo "ERROR: Expected v${{ inputs.version2 || '22.11.0' }} but got $NODE_VERSION"
194+
if [[ "$NODE_VERSION" != *"${{ matrix.version2 }}"* ]]; then
195+
echo "ERROR: Expected v${{ matrix.version2 }} but got $NODE_VERSION"
173196
exit 1
174197
fi
175198
shell: bash
@@ -179,17 +202,17 @@ jobs:
179202
cd "$TEST_WORKSPACE"
180203
mkdir -p test-project
181204
cd test-project
182-
../dtvem${{ matrix.ext }} local node ${{ inputs.version1 || '20.18.0' }}
205+
../dtvem${{ matrix.ext }} local node ${{ matrix.version1 }}
183206
CURRENT=$(../dtvem${{ matrix.ext }} current node --no-install)
184207
echo "Current node version in test-project: $CURRENT"
185-
if [[ "$CURRENT" != *"${{ inputs.version1 || '20.18.0' }}"* ]]; then
186-
echo "ERROR: Local override failed. Expected ${{ inputs.version1 || '20.18.0' }} but got $CURRENT"
208+
if [[ "$CURRENT" != *"${{ matrix.version1 }}"* ]]; then
209+
echo "ERROR: Local override failed. Expected ${{ matrix.version1 }} but got $CURRENT"
187210
exit 1
188211
fi
189212
NODE_VERSION=$(node --version)
190213
echo "Node version from shim in test-project: $NODE_VERSION"
191-
if [[ "$NODE_VERSION" != *"${{ inputs.version1 || '20.18.0' }}"* ]]; then
192-
echo "ERROR: Expected v${{ inputs.version1 || '20.18.0' }} but got $NODE_VERSION"
214+
if [[ "$NODE_VERSION" != *"${{ matrix.version1 }}"* ]]; then
215+
echo "ERROR: Expected v${{ matrix.version1 }} but got $NODE_VERSION"
193216
exit 1
194217
fi
195218
shell: bash
@@ -231,16 +254,16 @@ jobs:
231254
echo "" >> $GITHUB_STEP_SUMMARY
232255
shell: bash
233256

234-
- name: "Switch global back to ${{ inputs.version1 || '20.18.0' }} before uninstall"
257+
- name: "Switch global back to ${{ matrix.version1 }} before uninstall"
235258
run: |
236259
cd "$TEST_WORKSPACE"
237-
./dtvem${{ matrix.ext }} global node ${{ inputs.version1 || '20.18.0' }}
260+
./dtvem${{ matrix.ext }} global node ${{ matrix.version1 }}
238261
shell: bash
239262

240-
- name: "Uninstall version ${{ inputs.version2 || '22.11.0' }}"
263+
- name: "Uninstall version ${{ matrix.version2 }}"
241264
run: |
242265
cd "$TEST_WORKSPACE"
243-
./dtvem${{ matrix.ext }} uninstall node ${{ inputs.version2 || '22.11.0' }} --yes
266+
./dtvem${{ matrix.ext }} uninstall node ${{ matrix.version2 }} --yes
244267
shell: bash
245268

246269
- name: "Verify uninstall"
@@ -249,8 +272,8 @@ jobs:
249272
LIST_OUTPUT=$(./dtvem${{ matrix.ext }} list node)
250273
echo "Installed versions after uninstall:"
251274
echo "$LIST_OUTPUT"
252-
if [[ "$LIST_OUTPUT" == *"${{ inputs.version2 || '22.11.0' }}"* ]]; then
253-
echo "ERROR: Version ${{ inputs.version2 || '22.11.0' }} should have been uninstalled"
275+
if [[ "$LIST_OUTPUT" == *"${{ matrix.version2 }}"* ]]; then
276+
echo "ERROR: Version ${{ matrix.version2 }} should have been uninstalled"
254277
exit 1
255278
fi
256279
shell: bash

.github/workflows/integration-test-python.yml

Lines changed: 51 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)