From 942c01f6871dfae79c365f122ee50cb27a8c13bc Mon Sep 17 00:00:00 2001 From: "Calvin A. Allen" Date: Sun, 14 Dec 2025 13:25:12 -0500 Subject: [PATCH] fix(ci): fix Ruby integration test failures - Use 'all' source selection in rbenv migration tests (macOS and Ubuntu) to handle cases where system Ruby is detected before rbenv - Handle GitHub API rate limiting (HTTP 403/429) gracefully in Ruby integration test version verification step --- .../integration-test-migrate-ruby-macos-rbenv.yml | 3 ++- .../integration-test-migrate-ruby-ubuntu-rbenv.yml | 3 ++- .github/workflows/integration-test-ruby.yml | 14 ++++++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration-test-migrate-ruby-macos-rbenv.yml b/.github/workflows/integration-test-migrate-ruby-macos-rbenv.yml index cdaaea4..6746dec 100644 --- a/.github/workflows/integration-test-migrate-ruby-macos-rbenv.yml +++ b/.github/workflows/integration-test-migrate-ruby-macos-rbenv.yml @@ -49,7 +49,8 @@ jobs: - name: "Migrate rbenv Ruby to dtvem" run: | echo "=== Running migrate detection ===" - echo -e "1\n0\nn\n" | ./dist/dtvem migrate ruby || true + # Select "all" sources and "0" for all versions (rbenv may not be first source) + echo -e "all\n0\nn\n" | ./dist/dtvem migrate ruby || true echo "" echo "=== Verifying migration ===" ./dist/dtvem list ruby diff --git a/.github/workflows/integration-test-migrate-ruby-ubuntu-rbenv.yml b/.github/workflows/integration-test-migrate-ruby-ubuntu-rbenv.yml index a5f523f..453067f 100644 --- a/.github/workflows/integration-test-migrate-ruby-ubuntu-rbenv.yml +++ b/.github/workflows/integration-test-migrate-ruby-ubuntu-rbenv.yml @@ -57,7 +57,8 @@ jobs: - name: "Migrate rbenv Ruby to dtvem" run: | echo "=== Running migrate detection ===" - echo -e "1\n0\nn\n" | ./dist/dtvem migrate ruby || true + # Select "all" sources and "0" for all versions (rbenv may not be first source) + echo -e "all\n0\nn\n" | ./dist/dtvem migrate ruby || true echo "" echo "=== Verifying migration ===" ./dist/dtvem list ruby diff --git a/.github/workflows/integration-test-ruby.yml b/.github/workflows/integration-test-ruby.yml index 2010389..a203c63 100644 --- a/.github/workflows/integration-test-ruby.yml +++ b/.github/workflows/integration-test-ruby.yml @@ -116,8 +116,13 @@ jobs: # Verify test versions are available using --filter and stripping ANSI codes echo "Verifying test versions are available..." - # Check version1 + # Check version1 - handle rate limiting gracefully FILTERED=$(./dtvem${{ matrix.ext }} list-all ruby --filter "${{ matrix.version1 }}" 2>&1 | sed 's/\x1B\[[0-9;]*[a-zA-Z]//g') + if echo "$FILTERED" | grep -qE "(HTTP 403|HTTP 429|rate limit)"; then + echo "⚠ Warning: GitHub API rate limited, skipping version verification" + echo "Proceeding with install - it will fail if version doesn't exist" + exit 0 + fi if ! echo "$FILTERED" | grep -qF "${{ matrix.version1 }}"; then echo "ERROR: Version ${{ matrix.version1 }} not found in available versions" echo "Filtered output: $FILTERED" @@ -125,8 +130,13 @@ jobs: fi echo "✓ Version ${{ matrix.version1 }} is available" - # Check version2 + # Check version2 - handle rate limiting gracefully FILTERED=$(./dtvem${{ matrix.ext }} list-all ruby --filter "${{ matrix.version2 }}" 2>&1 | sed 's/\x1B\[[0-9;]*[a-zA-Z]//g') + if echo "$FILTERED" | grep -qE "(HTTP 403|HTTP 429|rate limit)"; then + echo "⚠ Warning: GitHub API rate limited, skipping version verification" + echo "Proceeding with install - it will fail if version doesn't exist" + exit 0 + fi if ! echo "$FILTERED" | grep -qF "${{ matrix.version2 }}"; then echo "ERROR: Version ${{ matrix.version2 }} not found in available versions" echo "Filtered output: $FILTERED"