From de1aeb586c00a137ca8110da3698ead99f144759 Mon Sep 17 00:00:00 2001 From: "Calvin A. Allen" Date: Wed, 17 Dec 2025 10:27:04 -0500 Subject: [PATCH] refactor(ci): move reusable integration test workflows to dtvem/.github Move 24 reusable integration test workflows to dtvem/.github to reduce clutter in the GitHub Actions UI. The top-level workflows remain here: - Integration Tests (integration-test.yml) - Integration Tests - All Migrations (integration-test-migrations.yml) - Integration Tests - Runtimes (integration-test-runtimes.yml) These now reference workflows in dtvem/.github/.github/workflows/ using the format: dtvem/.github/.github/workflows/.yml@main Moved workflows (24): - integration-test-node.yml, integration-test-python.yml, integration-test-ruby.yml - integration-test-migrations-node.yml, integration-test-migrations-python.yml, integration-test-migrations-ruby.yml - 18 individual migration test workflows (integration-test-migrate-*) --- ...ntegration-test-migrate-node-macos-fnm.yml | 76 ----- ...gration-test-migrate-node-macos-system.yml | 70 ---- ...tegration-test-migrate-node-ubuntu-nvm.yml | 72 ---- ...ration-test-migrate-node-ubuntu-system.yml | 70 ---- ...egration-test-migrate-node-windows-nvm.yml | 117 ------- ...ation-test-migrate-node-windows-system.yml | 77 ----- ...ration-test-migrate-python-macos-pyenv.yml | 74 ---- ...ation-test-migrate-python-macos-system.yml | 83 ----- ...ation-test-migrate-python-ubuntu-pyenv.yml | 83 ----- ...tion-test-migrate-python-ubuntu-system.yml | 83 ----- ...tion-test-migrate-python-windows-pyenv.yml | 108 ------ ...ion-test-migrate-python-windows-system.yml | 99 ------ ...egration-test-migrate-ruby-macos-rbenv.yml | 74 ---- ...gration-test-migrate-ruby-macos-system.yml | 74 ---- ...gration-test-migrate-ruby-ubuntu-rbenv.yml | 82 ----- ...ration-test-migrate-ruby-ubuntu-system.yml | 69 ---- ...ation-test-migrate-ruby-windows-system.yml | 87 ----- ...egration-test-migrate-ruby-windows-uru.yml | 132 ------- .../integration-test-migrations-node.yml | 36 -- .../integration-test-migrations-python.yml | 36 -- .../integration-test-migrations-ruby.yml | 36 -- .../workflows/integration-test-migrations.yml | 36 +- .github/workflows/integration-test-node.yml | 311 ----------------- .github/workflows/integration-test-python.yml | 312 ----------------- .github/workflows/integration-test-ruby.yml | 322 ------------------ .../workflows/integration-test-runtimes.yml | 6 +- .github/workflows/integration-test.yml | 42 +-- 27 files changed, 42 insertions(+), 2625 deletions(-) delete mode 100644 .github/workflows/integration-test-migrate-node-macos-fnm.yml delete mode 100644 .github/workflows/integration-test-migrate-node-macos-system.yml delete mode 100644 .github/workflows/integration-test-migrate-node-ubuntu-nvm.yml delete mode 100644 .github/workflows/integration-test-migrate-node-ubuntu-system.yml delete mode 100644 .github/workflows/integration-test-migrate-node-windows-nvm.yml delete mode 100644 .github/workflows/integration-test-migrate-node-windows-system.yml delete mode 100644 .github/workflows/integration-test-migrate-python-macos-pyenv.yml delete mode 100644 .github/workflows/integration-test-migrate-python-macos-system.yml delete mode 100644 .github/workflows/integration-test-migrate-python-ubuntu-pyenv.yml delete mode 100644 .github/workflows/integration-test-migrate-python-ubuntu-system.yml delete mode 100644 .github/workflows/integration-test-migrate-python-windows-pyenv.yml delete mode 100644 .github/workflows/integration-test-migrate-python-windows-system.yml delete mode 100644 .github/workflows/integration-test-migrate-ruby-macos-rbenv.yml delete mode 100644 .github/workflows/integration-test-migrate-ruby-macos-system.yml delete mode 100644 .github/workflows/integration-test-migrate-ruby-ubuntu-rbenv.yml delete mode 100644 .github/workflows/integration-test-migrate-ruby-ubuntu-system.yml delete mode 100644 .github/workflows/integration-test-migrate-ruby-windows-system.yml delete mode 100644 .github/workflows/integration-test-migrate-ruby-windows-uru.yml delete mode 100644 .github/workflows/integration-test-migrations-node.yml delete mode 100644 .github/workflows/integration-test-migrations-python.yml delete mode 100644 .github/workflows/integration-test-migrations-ruby.yml delete mode 100644 .github/workflows/integration-test-node.yml delete mode 100644 .github/workflows/integration-test-python.yml delete mode 100644 .github/workflows/integration-test-ruby.yml diff --git a/.github/workflows/integration-test-migrate-node-macos-fnm.yml b/.github/workflows/integration-test-migrate-node-macos-fnm.yml deleted file mode 100644 index 77f655d..0000000 --- a/.github/workflows/integration-test-migrate-node-macos-fnm.yml +++ /dev/null @@ -1,76 +0,0 @@ -name: Integration Tests - Migrate Node.js from fnm (macOS) - -on: - workflow_call: - workflow_dispatch: - -permissions: - contents: read - -jobs: - migrate: - name: Node.js from fnm (macOS) - runs-on: macos-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: '1.23' - cache: true - - - name: Build dtvem - run: | - go build -v -ldflags="-s -w" -o dist/dtvem ./src - go build -v -ldflags="-s -w" -o dist/dtvem-shim ./src/cmd/shim - - - name: Initialize dtvem - run: ./dist/dtvem init --yes - - - name: Add dtvem to PATH - run: | - echo "$HOME/.dtvem/shims" >> $GITHUB_PATH - echo "$HOME/.dtvem/bin" >> $GITHUB_PATH - - - name: "Install fnm" - run: | - curl -fsSL https://fnm.vercel.app/install | bash -s -- --skip-shell - echo "$HOME/.local/share/fnm" >> $GITHUB_PATH - - - name: "Install Node.js 20.18.0 via fnm" - run: | - export PATH="$HOME/.local/share/fnm:$PATH" - eval "$(fnm env --shell bash)" - fnm install 20.18.0 - fnm use 20.18.0 - echo "fnm Node.js installed at: $(which node)" - node --version - - - name: "Migrate fnm Node.js to dtvem" - run: | - echo "=== Running migrate detection ===" - # Select "all" to migrate all detected versions (system + fnm) - echo -e "all\n0\nn\n" | ./dist/dtvem migrate node || true - echo "" - echo "=== Verifying migration ===" - ./dist/dtvem list node - - - name: "Verify migrated version" - run: | - ./dist/dtvem list node | grep -E "20\.18\.0" || (echo "ERROR: Expected Node.js 20.18.0 to be migrated" && exit 1) - echo "SUCCESS: Node.js 20.18.0 was migrated from fnm" - - - name: Generate summary - if: always() - run: | - echo "## Node.js Migration from fnm (macOS)" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "**Source:** fnm" >> $GITHUB_STEP_SUMMARY - echo "**Version:** 20.18.0" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Installed Versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dist/dtvem list node >> $GITHUB_STEP_SUMMARY 2>&1 || echo "No versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/integration-test-migrate-node-macos-system.yml b/.github/workflows/integration-test-migrate-node-macos-system.yml deleted file mode 100644 index 010f7e3..0000000 --- a/.github/workflows/integration-test-migrate-node-macos-system.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: Integration Tests - Migrate Node.js from System (macOS) - -on: - workflow_call: - workflow_dispatch: - -permissions: - contents: read - -jobs: - migrate: - name: Node.js from System (macOS) - runs-on: macos-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: '1.23' - cache: true - - - name: Build dtvem - run: | - go build -v -ldflags="-s -w" -o dist/dtvem ./src - go build -v -ldflags="-s -w" -o dist/dtvem-shim ./src/cmd/shim - - - name: Initialize dtvem - run: ./dist/dtvem init --yes - - - name: Add dtvem to PATH - run: | - echo "$HOME/.dtvem/shims" >> $GITHUB_PATH - echo "$HOME/.dtvem/bin" >> $GITHUB_PATH - - - name: "Verify pre-installed Node.js" - run: | - echo "System Node.js installed at: $(which node)" - node --version - # Capture the version for later verification - NODE_VERSION=$(node --version | sed 's/v//') - echo "NODE_VERSION=$NODE_VERSION" >> $GITHUB_ENV - - - name: "Migrate system Node.js to dtvem" - run: | - echo "=== Running migrate detection ===" - echo -e "1\n0\n" | ./dist/dtvem migrate node || true - echo "" - echo "=== Verifying migration ===" - ./dist/dtvem list node - - - name: "Verify migrated version" - run: | - # Check that we have the same version that was pre-installed - ./dist/dtvem list node | grep -F "$NODE_VERSION" || (echo "ERROR: Expected Node.js $NODE_VERSION to be migrated" && exit 1) - echo "SUCCESS: Node.js $NODE_VERSION was migrated from system" - - - name: Generate summary - if: always() - run: | - echo "## Node.js Migration from System (macOS)" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "**Source:** Pre-installed system Node.js" >> $GITHUB_STEP_SUMMARY - echo "**Version:** $NODE_VERSION" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Installed Versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dist/dtvem list node >> $GITHUB_STEP_SUMMARY 2>&1 || echo "No versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/integration-test-migrate-node-ubuntu-nvm.yml b/.github/workflows/integration-test-migrate-node-ubuntu-nvm.yml deleted file mode 100644 index a7b9ff7..0000000 --- a/.github/workflows/integration-test-migrate-node-ubuntu-nvm.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: Integration Tests - Migrate Node.js from nvm (Ubuntu) - -on: - workflow_call: - workflow_dispatch: - -permissions: - contents: read - -jobs: - migrate: - name: Node.js from nvm (Ubuntu) - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: '1.23' - cache: true - - - name: Build dtvem - run: | - go build -v -ldflags="-s -w" -o dist/dtvem ./src - go build -v -ldflags="-s -w" -o dist/dtvem-shim ./src/cmd/shim - - - name: Initialize dtvem - run: ./dist/dtvem init --yes - - - name: Add dtvem to PATH - run: | - echo "$HOME/.dtvem/shims" >> $GITHUB_PATH - echo "$HOME/.dtvem/bin" >> $GITHUB_PATH - - - name: "Install Node.js 20.18.0 via nvm" - run: | - # nvm is preinstalled on Ubuntu runners - export NVM_DIR="$HOME/.nvm" - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" - nvm install 20.18.0 - nvm use 20.18.0 - echo "nvm Node.js installed at: $(which node)" - node --version - - - name: "Migrate nvm Node.js to dtvem" - run: | - echo "=== Running migrate detection ===" - # Select "all" to migrate all detected versions (system + nvm) - echo -e "all\n0\nn\n" | ./dist/dtvem migrate node || true - echo "" - echo "=== Verifying migration ===" - ./dist/dtvem list node - - - name: "Verify migrated version" - run: | - ./dist/dtvem list node | grep -E "20\.18\.0" || (echo "ERROR: Expected Node.js 20.18.0 to be migrated" && exit 1) - echo "SUCCESS: Node.js 20.18.0 was migrated from nvm" - - - name: Generate summary - if: always() - run: | - echo "## Node.js Migration from nvm (Ubuntu)" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "**Source:** nvm" >> $GITHUB_STEP_SUMMARY - echo "**Version:** 20.18.0" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Installed Versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dist/dtvem list node >> $GITHUB_STEP_SUMMARY 2>&1 || echo "No versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/integration-test-migrate-node-ubuntu-system.yml b/.github/workflows/integration-test-migrate-node-ubuntu-system.yml deleted file mode 100644 index 691e8d8..0000000 --- a/.github/workflows/integration-test-migrate-node-ubuntu-system.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: Integration Tests - Migrate Node.js from System (Ubuntu) - -on: - workflow_call: - workflow_dispatch: - -permissions: - contents: read - -jobs: - migrate: - name: Node.js from System (Ubuntu) - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: '1.23' - cache: true - - - name: Build dtvem - run: | - go build -v -ldflags="-s -w" -o dist/dtvem ./src - go build -v -ldflags="-s -w" -o dist/dtvem-shim ./src/cmd/shim - - - name: Initialize dtvem - run: ./dist/dtvem init --yes - - - name: Add dtvem to PATH - run: | - echo "$HOME/.dtvem/shims" >> $GITHUB_PATH - echo "$HOME/.dtvem/bin" >> $GITHUB_PATH - - - name: "Verify pre-installed Node.js" - run: | - echo "System Node.js installed at: $(which node)" - node --version - # Capture the version for later verification - NODE_VERSION=$(node --version | sed 's/v//') - echo "NODE_VERSION=$NODE_VERSION" >> $GITHUB_ENV - - - name: "Migrate system Node.js to dtvem" - run: | - echo "=== Running migrate detection ===" - echo -e "1\n0\n" | ./dist/dtvem migrate node || true - echo "" - echo "=== Verifying migration ===" - ./dist/dtvem list node - - - name: "Verify migrated version" - run: | - # Check that we have the same version that was pre-installed - ./dist/dtvem list node | grep -F "$NODE_VERSION" || (echo "ERROR: Expected Node.js $NODE_VERSION to be migrated" && exit 1) - echo "SUCCESS: Node.js $NODE_VERSION was migrated from system" - - - name: Generate summary - if: always() - run: | - echo "## Node.js Migration from System (Ubuntu)" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "**Source:** Pre-installed system Node.js" >> $GITHUB_STEP_SUMMARY - echo "**Version:** $NODE_VERSION" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Installed Versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dist/dtvem list node >> $GITHUB_STEP_SUMMARY 2>&1 || echo "No versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/integration-test-migrate-node-windows-nvm.yml b/.github/workflows/integration-test-migrate-node-windows-nvm.yml deleted file mode 100644 index 16b13ef..0000000 --- a/.github/workflows/integration-test-migrate-node-windows-nvm.yml +++ /dev/null @@ -1,117 +0,0 @@ -name: Integration Tests - Migrate Node.js from nvm-windows (Windows) - -on: - workflow_call: - workflow_dispatch: - -permissions: - contents: read - -jobs: - migrate: - name: Node.js from nvm-windows (Windows) - runs-on: windows-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: '1.23' - cache: true - - - name: Build dtvem - shell: bash - run: | - go build -v -ldflags="-s -w" -o dist/dtvem.exe ./src - go build -v -ldflags="-s -w" -o dist/dtvem-shim.exe ./src/cmd/shim - - - name: Initialize dtvem - shell: bash - run: ./dist/dtvem.exe init --yes - - - name: Add dtvem to PATH - shell: pwsh - run: | - "$env:USERPROFILE\.dtvem\shims" | Out-File -FilePath $env:GITHUB_PATH -Append - "$env:USERPROFILE\.dtvem\bin" | Out-File -FilePath $env:GITHUB_PATH -Append - - - name: "Install nvm-windows" - shell: pwsh - run: | - # Manual installation of nvm-windows (Chocolatey's async installer doesn't work in CI) - $nvmVersion = "1.2.2" - $nvmHome = "$env:USERPROFILE\AppData\Roaming\nvm" - $nvmSymlink = "$env:USERPROFILE\AppData\Roaming\nodejs" - - # Create directories - New-Item -ItemType Directory -Force -Path $nvmHome | Out-Null - New-Item -ItemType Directory -Force -Path $nvmSymlink | Out-Null - - # Download nvm-windows noinstall zip - $nvmZip = "$env:TEMP\nvm-noinstall.zip" - Invoke-WebRequest -Uri "https://github.com/coreybutler/nvm-windows/releases/download/$nvmVersion/nvm-noinstall.zip" -OutFile $nvmZip - - # Extract to NVM_HOME - Expand-Archive -Path $nvmZip -DestinationPath $nvmHome -Force - - # Create settings.txt - $settings = @" - root: $nvmHome - path: $nvmSymlink - proxy: none - "@ - $settings | Out-File -FilePath "$nvmHome\settings.txt" -Encoding UTF8 - - # Export environment variables for subsequent steps - "NVM_HOME=$nvmHome" | Out-File -FilePath $env:GITHUB_ENV -Append - "NVM_SYMLINK=$nvmSymlink" | Out-File -FilePath $env:GITHUB_ENV -Append - - # Add to PATH for subsequent steps - "$nvmHome" | Out-File -FilePath $env:GITHUB_PATH -Append - "$nvmSymlink" | Out-File -FilePath $env:GITHUB_PATH -Append - - Write-Host "NVM_HOME: $nvmHome" - Write-Host "NVM_SYMLINK: $nvmSymlink" - Write-Host "nvm.exe exists: $(Test-Path "$nvmHome\nvm.exe")" - - - name: "Install Node.js 20.18.0 via nvm-windows" - shell: pwsh - run: | - Write-Host "NVM_HOME: $env:NVM_HOME" - Write-Host "nvm.exe path: $env:NVM_HOME\nvm.exe" - & "$env:NVM_HOME\nvm.exe" install 20.18.0 - & "$env:NVM_HOME\nvm.exe" use 20.18.0 - Write-Host "nvm-windows Node.js version:" - node --version - - - name: "Migrate nvm-windows Node.js to dtvem" - shell: bash - run: | - echo "=== Running migrate detection ===" - # Select "all" to migrate all detected versions (system + nvm) - echo -e "all\n0\nn\n" | ./dist/dtvem.exe migrate node || true - echo "" - echo "=== Verifying migration ===" - ./dist/dtvem.exe list node - - - name: "Verify migrated version" - shell: bash - run: | - ./dist/dtvem.exe list node | grep -E "20\.18\.0" || (echo "ERROR: Expected Node.js 20.18.0 to be migrated" && exit 1) - echo "SUCCESS: Node.js 20.18.0 was migrated from nvm-windows" - - - name: Generate summary - if: always() - shell: bash - run: | - echo "## Node.js Migration from nvm-windows (Windows)" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "**Source:** nvm-windows" >> $GITHUB_STEP_SUMMARY - echo "**Version:** 20.18.0" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Installed Versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dist/dtvem.exe list node >> $GITHUB_STEP_SUMMARY 2>&1 || echo "No versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/integration-test-migrate-node-windows-system.yml b/.github/workflows/integration-test-migrate-node-windows-system.yml deleted file mode 100644 index 78db386..0000000 --- a/.github/workflows/integration-test-migrate-node-windows-system.yml +++ /dev/null @@ -1,77 +0,0 @@ -name: Integration Tests - Migrate Node.js from System (Windows) - -on: - workflow_call: - workflow_dispatch: - -permissions: - contents: read - -jobs: - migrate: - name: Node.js from System (Windows) - runs-on: windows-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: '1.23' - cache: true - - - name: Build dtvem - shell: bash - run: | - go build -v -ldflags="-s -w" -o dist/dtvem.exe ./src - go build -v -ldflags="-s -w" -o dist/dtvem-shim.exe ./src/cmd/shim - - - name: Initialize dtvem - shell: bash - run: ./dist/dtvem.exe init --yes - - - name: Add dtvem to PATH - shell: pwsh - run: | - "$env:USERPROFILE\.dtvem\shims" | Out-File -FilePath $env:GITHUB_PATH -Append - "$env:USERPROFILE\.dtvem\bin" | Out-File -FilePath $env:GITHUB_PATH -Append - - - name: "Verify pre-installed Node.js" - shell: pwsh - run: | - Write-Host "System Node.js installed at: $(where.exe node)" - $version = (node --version) -replace '^v', '' - Write-Host "Node.js version: $version" - # Save version for later verification - "NODE_VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Append - - - name: "Migrate system Node.js to dtvem" - shell: bash - run: | - echo "=== Running migrate detection ===" - echo -e "1\n0\n" | ./dist/dtvem.exe migrate node || true - echo "" - echo "=== Verifying migration ===" - ./dist/dtvem.exe list node - - - name: "Verify migrated version" - shell: bash - run: | - # Check that we have the same version that was pre-installed - ./dist/dtvem.exe list node | grep -F "$NODE_VERSION" || (echo "ERROR: Expected Node.js $NODE_VERSION to be migrated" && exit 1) - echo "SUCCESS: Node.js $NODE_VERSION was migrated from system" - - - name: Generate summary - if: always() - shell: bash - run: | - echo "## Node.js Migration from System (Windows)" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "**Source:** Pre-installed system Node.js" >> $GITHUB_STEP_SUMMARY - echo "**Version:** $NODE_VERSION" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Installed Versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dist/dtvem.exe list node >> $GITHUB_STEP_SUMMARY 2>&1 || echo "No versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/integration-test-migrate-python-macos-pyenv.yml b/.github/workflows/integration-test-migrate-python-macos-pyenv.yml deleted file mode 100644 index b6a63b7..0000000 --- a/.github/workflows/integration-test-migrate-python-macos-pyenv.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: Integration Tests - Migrate Python from pyenv (macOS) - -on: - workflow_call: - workflow_dispatch: - -permissions: - contents: read - -jobs: - migrate: - name: Python from pyenv (macOS) - runs-on: macos-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: '1.23' - cache: true - - - name: Build dtvem - run: | - go build -v -ldflags="-s -w" -o dist/dtvem ./src - go build -v -ldflags="-s -w" -o dist/dtvem-shim ./src/cmd/shim - - - name: Initialize dtvem - run: ./dist/dtvem init --yes - - - name: Add dtvem to PATH - run: | - echo "$HOME/.dtvem/shims" >> $GITHUB_PATH - echo "$HOME/.dtvem/bin" >> $GITHUB_PATH - - - name: "Install pyenv via Homebrew" - run: | - brew install pyenv - - - name: "Install Python 3.11.9 via pyenv" - run: | - eval "$(pyenv init -)" - pyenv install 3.11.9 - pyenv global 3.11.9 - echo "pyenv Python installed at: $(pyenv which python)" - python --version - - - name: "Migrate pyenv Python to dtvem" - run: | - echo "=== Running migrate detection ===" - # Select "all" to migrate all detected versions - echo -e "all\n0\nn\n" | ./dist/dtvem migrate python || true - echo "" - echo "=== Verifying migration ===" - ./dist/dtvem list python - - - name: "Verify migrated version" - run: | - ./dist/dtvem list python | grep -E "3\.11\.9" || (echo "ERROR: Expected Python 3.11.9 to be migrated" && exit 1) - echo "SUCCESS: Python 3.11.9 was migrated from pyenv" - - - name: Generate summary - if: always() - run: | - echo "## Python Migration from pyenv (macOS)" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "**Source:** pyenv" >> $GITHUB_STEP_SUMMARY - echo "**Version:** 3.11.9" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Installed Versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dist/dtvem list python >> $GITHUB_STEP_SUMMARY 2>&1 || echo "No versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/integration-test-migrate-python-macos-system.yml b/.github/workflows/integration-test-migrate-python-macos-system.yml deleted file mode 100644 index 1530a0c..0000000 --- a/.github/workflows/integration-test-migrate-python-macos-system.yml +++ /dev/null @@ -1,83 +0,0 @@ -name: Integration Tests - Migrate Python from System (macOS) - -on: - workflow_call: - workflow_dispatch: - -permissions: - contents: read - -jobs: - migrate: - name: Python from System (macOS) - runs-on: macos-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: '1.23' - cache: true - - - name: Build dtvem - run: | - go build -v -ldflags="-s -w" -o dist/dtvem ./src - go build -v -ldflags="-s -w" -o dist/dtvem-shim ./src/cmd/shim - - - name: Initialize dtvem - run: ./dist/dtvem init --yes - - - name: Add dtvem to PATH - run: | - echo "$HOME/.dtvem/shims" >> $GITHUB_PATH - echo "$HOME/.dtvem/bin" >> $GITHUB_PATH - - - name: "Set up Python 3.11.9 (available in python-build-standalone)" - uses: actions/setup-python@v5 - with: - python-version: '3.11.9' - - - name: "Verify Python version" - id: detect-python - run: | - echo "System Python installed at: $(which python3)" - python3 --version - # Extract version for verification - VERSION=$(python3 --version | grep -oE '[0-9]+\.[0-9]+\.[0-9]+') - echo "PYTHON_VERSION=$VERSION" >> $GITHUB_OUTPUT - - - name: "Migrate system Python to dtvem" - run: | - echo "=== Running migrate detection ===" - # Select "all" to migrate all detected versions - echo -e "all\n0\n" | ./dist/dtvem migrate python || true - echo "" - echo "=== Verifying migration ===" - ./dist/dtvem list python - - - name: "Verify migrated version" - env: - EXPECTED_VERSION: ${{ steps.detect-python.outputs.PYTHON_VERSION }} - run: | - # Extract major.minor from detected version (e.g., "3.11" from "3.11.9") - MAJOR_MINOR=$(echo "$EXPECTED_VERSION" | cut -d. -f1,2) - echo "Looking for Python $MAJOR_MINOR.x" - ./dist/dtvem list python | grep -E "${MAJOR_MINOR}\." || (echo "ERROR: Expected Python ${MAJOR_MINOR}.x to be migrated" && exit 1) - echo "SUCCESS: Python ${MAJOR_MINOR}.x was migrated from system" - - - name: Generate summary - if: always() - env: - EXPECTED_VERSION: ${{ steps.detect-python.outputs.PYTHON_VERSION }} - run: | - echo "## Python Migration from System (macOS)" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "**Source:** actions/setup-python" >> $GITHUB_STEP_SUMMARY - echo "**Version:** $EXPECTED_VERSION" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Installed Versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dist/dtvem list python >> $GITHUB_STEP_SUMMARY 2>&1 || echo "No versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/integration-test-migrate-python-ubuntu-pyenv.yml b/.github/workflows/integration-test-migrate-python-ubuntu-pyenv.yml deleted file mode 100644 index 85357c8..0000000 --- a/.github/workflows/integration-test-migrate-python-ubuntu-pyenv.yml +++ /dev/null @@ -1,83 +0,0 @@ -name: Integration Tests - Migrate Python from pyenv (Ubuntu) - -on: - workflow_call: - workflow_dispatch: - -permissions: - contents: read - -jobs: - migrate: - name: Python from pyenv (Ubuntu) - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: '1.23' - cache: true - - - name: Build dtvem - run: | - go build -v -ldflags="-s -w" -o dist/dtvem ./src - go build -v -ldflags="-s -w" -o dist/dtvem-shim ./src/cmd/shim - - - name: Initialize dtvem - run: ./dist/dtvem init --yes - - - name: Add dtvem to PATH - run: | - echo "$HOME/.dtvem/shims" >> $GITHUB_PATH - echo "$HOME/.dtvem/bin" >> $GITHUB_PATH - - - name: "Install pyenv and dependencies" - run: | - sudo apt-get update - sudo apt-get install -y make build-essential libssl-dev zlib1g-dev \ - libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \ - libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev - curl https://pyenv.run | bash - echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc - echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc - echo 'eval "$(pyenv init -)"' >> ~/.bashrc - - - name: "Install Python 3.11.9 via pyenv" - run: | - export PYENV_ROOT="$HOME/.pyenv" - export PATH="$PYENV_ROOT/bin:$PATH" - eval "$(pyenv init -)" - pyenv install 3.11.9 - pyenv global 3.11.9 - echo "pyenv Python installed at: $(pyenv which python)" - python --version - - - name: "Migrate pyenv Python to dtvem" - run: | - echo "=== Running migrate detection ===" - # Select "all" to migrate all detected versions - echo -e "all\n0\nn\n" | ./dist/dtvem migrate python || true - echo "" - echo "=== Verifying migration ===" - ./dist/dtvem list python - - - name: "Verify migrated version" - run: | - ./dist/dtvem list python | grep -E "3\.11\.9" || (echo "ERROR: Expected Python 3.11.9 to be migrated" && exit 1) - echo "SUCCESS: Python 3.11.9 was migrated from pyenv" - - - name: Generate summary - if: always() - run: | - echo "## Python Migration from pyenv (Ubuntu)" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "**Source:** pyenv" >> $GITHUB_STEP_SUMMARY - echo "**Version:** 3.11.9" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Installed Versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dist/dtvem list python >> $GITHUB_STEP_SUMMARY 2>&1 || echo "No versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/integration-test-migrate-python-ubuntu-system.yml b/.github/workflows/integration-test-migrate-python-ubuntu-system.yml deleted file mode 100644 index e771cfc..0000000 --- a/.github/workflows/integration-test-migrate-python-ubuntu-system.yml +++ /dev/null @@ -1,83 +0,0 @@ -name: Integration Tests - Migrate Python from System (Ubuntu) - -on: - workflow_call: - workflow_dispatch: - -permissions: - contents: read - -jobs: - migrate: - name: Python from System (Ubuntu) - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: '1.23' - cache: true - - - name: Build dtvem - run: | - go build -v -ldflags="-s -w" -o dist/dtvem ./src - go build -v -ldflags="-s -w" -o dist/dtvem-shim ./src/cmd/shim - - - name: Initialize dtvem - run: ./dist/dtvem init --yes - - - name: Add dtvem to PATH - run: | - echo "$HOME/.dtvem/shims" >> $GITHUB_PATH - echo "$HOME/.dtvem/bin" >> $GITHUB_PATH - - - name: "Set up Python 3.11.9 (available in python-build-standalone)" - uses: actions/setup-python@v5 - with: - python-version: '3.11.9' - - - name: "Verify Python version" - id: detect-python - run: | - echo "System Python installed at: $(which python3)" - python3 --version - # Extract version for verification - VERSION=$(python3 --version | grep -oP '\d+\.\d+\.\d+') - echo "PYTHON_VERSION=$VERSION" >> $GITHUB_OUTPUT - - - name: "Migrate system Python to dtvem" - run: | - echo "=== Running migrate detection ===" - # Select "all" to migrate all detected versions - echo -e "all\n0\n" | ./dist/dtvem migrate python || true - echo "" - echo "=== Verifying migration ===" - ./dist/dtvem list python - - - name: "Verify migrated version" - env: - EXPECTED_VERSION: ${{ steps.detect-python.outputs.PYTHON_VERSION }} - run: | - # Extract major.minor from detected version (e.g., "3.11" from "3.11.9") - MAJOR_MINOR=$(echo "$EXPECTED_VERSION" | cut -d. -f1,2) - echo "Looking for Python $MAJOR_MINOR.x" - ./dist/dtvem list python | grep -E "${MAJOR_MINOR}\." || (echo "ERROR: Expected Python ${MAJOR_MINOR}.x to be migrated" && exit 1) - echo "SUCCESS: Python ${MAJOR_MINOR}.x was migrated from system" - - - name: Generate summary - if: always() - env: - EXPECTED_VERSION: ${{ steps.detect-python.outputs.PYTHON_VERSION }} - run: | - echo "## Python Migration from System (Ubuntu)" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "**Source:** actions/setup-python" >> $GITHUB_STEP_SUMMARY - echo "**Version:** $EXPECTED_VERSION" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Installed Versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dist/dtvem list python >> $GITHUB_STEP_SUMMARY 2>&1 || echo "No versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/integration-test-migrate-python-windows-pyenv.yml b/.github/workflows/integration-test-migrate-python-windows-pyenv.yml deleted file mode 100644 index 5b13c0f..0000000 --- a/.github/workflows/integration-test-migrate-python-windows-pyenv.yml +++ /dev/null @@ -1,108 +0,0 @@ -name: Integration Tests - Migrate Python from pyenv-win (Windows) - -on: - workflow_call: - workflow_dispatch: - -permissions: - contents: read - -jobs: - migrate: - name: Python from pyenv-win (Windows) - runs-on: windows-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: '1.23' - cache: true - - - name: Build dtvem - shell: bash - run: | - go build -v -ldflags="-s -w" -o dist/dtvem.exe ./src - go build -v -ldflags="-s -w" -o dist/dtvem-shim.exe ./src/cmd/shim - - - name: Initialize dtvem - shell: bash - run: ./dist/dtvem.exe init --yes - - - name: Add dtvem to PATH - shell: pwsh - run: | - "$env:USERPROFILE\.dtvem\shims" | Out-File -FilePath $env:GITHUB_PATH -Append - "$env:USERPROFILE\.dtvem\bin" | Out-File -FilePath $env:GITHUB_PATH -Append - - - name: "Install pyenv-win" - shell: pwsh - run: | - pip install pyenv-win --target "$env:USERPROFILE\.pyenv" - [System.Environment]::SetEnvironmentVariable('PYENV', "$env:USERPROFILE\.pyenv\pyenv-win\", "User") - [System.Environment]::SetEnvironmentVariable('PYENV_ROOT', "$env:USERPROFILE\.pyenv\pyenv-win\", "User") - [System.Environment]::SetEnvironmentVariable('PYENV_HOME', "$env:USERPROFILE\.pyenv\pyenv-win\", "User") - "$env:USERPROFILE\.pyenv\pyenv-win\bin" | Out-File -FilePath $env:GITHUB_PATH -Append - "$env:USERPROFILE\.pyenv\pyenv-win\shims" | Out-File -FilePath $env:GITHUB_PATH -Append - - - name: "Find and install available Python 3.11.x via pyenv-win" - id: install-python - shell: pwsh - run: | - $env:Path = "$env:USERPROFILE\.pyenv\pyenv-win\bin;$env:USERPROFILE\.pyenv\pyenv-win\shims;$env:Path" - - # List available versions and find latest 3.11.x (non-dev, non-rc) - Write-Host "Available Python 3.11.x versions:" - $versions = pyenv install -l | Select-String "^\s*3\.11\.\d+$" | ForEach-Object { $_.Line.Trim() } - $versions | ForEach-Object { Write-Host " $_" } - - # Get the latest 3.11.x version (last one in sorted list) - $latestVersion = $versions | Sort-Object { [version]$_ } | Select-Object -Last 1 - Write-Host "Installing Python $latestVersion" - - pyenv install $latestVersion - pyenv global $latestVersion - pyenv rehash - - Write-Host "pyenv-win Python version:" - python --version - - # Output the version for later steps - "PYTHON_VERSION=$latestVersion" | Out-File -FilePath $env:GITHUB_OUTPUT -Append - - - name: "Migrate pyenv-win Python to dtvem" - shell: bash - run: | - echo "=== Running migrate detection ===" - # Select "all" to migrate all detected versions - echo -e "all\n0\nn\n" | ./dist/dtvem.exe migrate python || true - echo "" - echo "=== Verifying migration ===" - ./dist/dtvem.exe list python - - - name: "Verify migrated version" - shell: bash - env: - EXPECTED_VERSION: ${{ steps.install-python.outputs.PYTHON_VERSION }} - run: | - echo "Looking for Python $EXPECTED_VERSION" - ./dist/dtvem.exe list python | grep -E "$EXPECTED_VERSION" || (echo "ERROR: Expected Python $EXPECTED_VERSION to be migrated" && exit 1) - echo "SUCCESS: Python $EXPECTED_VERSION was migrated from pyenv-win" - - - name: Generate summary - if: always() - shell: bash - env: - EXPECTED_VERSION: ${{ steps.install-python.outputs.PYTHON_VERSION }} - run: | - echo "## Python Migration from pyenv-win (Windows)" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "**Source:** pyenv-win" >> $GITHUB_STEP_SUMMARY - echo "**Version:** $EXPECTED_VERSION" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Installed Versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dist/dtvem.exe list python >> $GITHUB_STEP_SUMMARY 2>&1 || echo "No versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/integration-test-migrate-python-windows-system.yml b/.github/workflows/integration-test-migrate-python-windows-system.yml deleted file mode 100644 index e716c59..0000000 --- a/.github/workflows/integration-test-migrate-python-windows-system.yml +++ /dev/null @@ -1,99 +0,0 @@ -name: Integration Tests - Migrate Python from System (Windows) - -on: - workflow_call: - workflow_dispatch: - -permissions: - contents: read - -jobs: - migrate: - name: Python from System (Windows) - runs-on: windows-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: '1.23' - cache: true - - # Install a Python version that's available in our manifest for Windows - # python-build-standalone only has Windows builds starting from 3.10.14 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - - name: Build dtvem - shell: bash - run: | - go build -v -ldflags="-s -w" -o dist/dtvem.exe ./src - go build -v -ldflags="-s -w" -o dist/dtvem-shim.exe ./src/cmd/shim - - - name: Initialize dtvem - shell: bash - run: ./dist/dtvem.exe init --yes - - - name: Add dtvem to PATH - shell: pwsh - run: | - "$env:USERPROFILE\.dtvem\shims" | Out-File -FilePath $env:GITHUB_PATH -Append - "$env:USERPROFILE\.dtvem\bin" | Out-File -FilePath $env:GITHUB_PATH -Append - - - name: "Detect pre-installed Python version" - id: detect-python - shell: pwsh - run: | - # GitHub runners have Python pre-installed, use that version - $pythonVersion = python --version 2>&1 - Write-Host "Pre-installed Python: $pythonVersion" - # Extract version number (e.g., "3.9.13" from "Python 3.9.13") - if ($pythonVersion -match "Python (\d+\.\d+\.\d+)") { - $version = $Matches[1] - Write-Host "Detected version: $version" - "PYTHON_VERSION=$version" | Out-File -FilePath $env:GITHUB_OUTPUT -Append - } else { - Write-Host "ERROR: Could not detect Python version" - exit 1 - } - - - name: "Migrate system Python to dtvem" - shell: bash - run: | - echo "=== Running migrate detection ===" - # Select "all" to migrate all detected versions - echo -e "all\n0\n" | ./dist/dtvem.exe migrate python || true - echo "" - echo "=== Verifying migration ===" - ./dist/dtvem.exe list python - - - name: "Verify migrated version" - shell: bash - env: - EXPECTED_VERSION: ${{ steps.detect-python.outputs.PYTHON_VERSION }} - run: | - # Extract major.minor from detected version (e.g., "3.9" from "3.9.13") - MAJOR_MINOR=$(echo "$EXPECTED_VERSION" | cut -d. -f1,2) - echo "Looking for Python $MAJOR_MINOR.x" - ./dist/dtvem.exe list python | grep -E "${MAJOR_MINOR}\." || (echo "ERROR: Expected Python ${MAJOR_MINOR}.x to be migrated" && exit 1) - echo "SUCCESS: Python ${MAJOR_MINOR}.x was migrated from system" - - - name: Generate summary - if: always() - shell: bash - env: - EXPECTED_VERSION: ${{ steps.detect-python.outputs.PYTHON_VERSION }} - run: | - echo "## Python Migration from System (Windows)" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "**Source:** Pre-installed (GitHub Runner)" >> $GITHUB_STEP_SUMMARY - echo "**Version:** $EXPECTED_VERSION" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Installed Versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dist/dtvem.exe list python >> $GITHUB_STEP_SUMMARY 2>&1 || echo "No versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/integration-test-migrate-ruby-macos-rbenv.yml b/.github/workflows/integration-test-migrate-ruby-macos-rbenv.yml deleted file mode 100644 index 6746dec..0000000 --- a/.github/workflows/integration-test-migrate-ruby-macos-rbenv.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: Integration Tests - Migrate Ruby from rbenv (macOS) - -on: - workflow_call: - workflow_dispatch: - -permissions: - contents: read - -jobs: - migrate: - name: Ruby from rbenv (macOS) - runs-on: macos-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: '1.23' - cache: true - - - name: Build dtvem - run: | - go build -v -ldflags="-s -w" -o dist/dtvem ./src - go build -v -ldflags="-s -w" -o dist/dtvem-shim ./src/cmd/shim - - - name: Initialize dtvem - run: ./dist/dtvem init --yes - - - name: Add dtvem to PATH - run: | - echo "$HOME/.dtvem/shims" >> $GITHUB_PATH - echo "$HOME/.dtvem/bin" >> $GITHUB_PATH - - - name: "Install rbenv via Homebrew" - run: | - brew install rbenv ruby-build - - - name: "Install Ruby 3.3.6 via rbenv" - run: | - eval "$(rbenv init -)" - rbenv install 3.3.6 - rbenv global 3.3.6 - echo "rbenv Ruby installed at: $(rbenv which ruby)" - ruby --version - - - name: "Migrate rbenv Ruby to dtvem" - run: | - echo "=== Running migrate detection ===" - # 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 - - - name: "Verify migrated version" - run: | - ./dist/dtvem list ruby | grep -E "3\.3\.6" || (echo "ERROR: Expected Ruby 3.3.6 to be migrated" && exit 1) - echo "SUCCESS: Ruby 3.3.6 was migrated from rbenv" - - - name: Generate summary - if: always() - run: | - echo "## Ruby Migration from rbenv (macOS)" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "**Source:** rbenv" >> $GITHUB_STEP_SUMMARY - echo "**Version:** 3.3.6" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Installed Versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dist/dtvem list ruby >> $GITHUB_STEP_SUMMARY 2>&1 || echo "No versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/integration-test-migrate-ruby-macos-system.yml b/.github/workflows/integration-test-migrate-ruby-macos-system.yml deleted file mode 100644 index c77ba1c..0000000 --- a/.github/workflows/integration-test-migrate-ruby-macos-system.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: Integration Tests - Migrate Ruby from System (macOS) - -on: - workflow_call: - workflow_dispatch: - -permissions: - contents: read - -jobs: - migrate: - name: Ruby from System (macOS) - runs-on: macos-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: '1.23' - cache: true - - - name: Build dtvem - run: | - go build -v -ldflags="-s -w" -o dist/dtvem ./src - go build -v -ldflags="-s -w" -o dist/dtvem-shim ./src/cmd/shim - - - name: Initialize dtvem - run: ./dist/dtvem init --yes - - - name: Add dtvem to PATH - run: | - echo "$HOME/.dtvem/shims" >> $GITHUB_PATH - echo "$HOME/.dtvem/bin" >> $GITHUB_PATH - - - name: "Install Ruby 3.2 via Homebrew" - run: | - brew install ruby@3.2 - brew link --overwrite ruby@3.2 - # Add to PATH for this step - export PATH="$(brew --prefix ruby@3.2)/bin:$PATH" - echo "System Ruby installed at: $(which ruby)" - ruby --version - - - name: "Add Homebrew Ruby to PATH" - run: | - echo "$(brew --prefix ruby@3.2)/bin" >> $GITHUB_PATH - - - name: "Migrate system Ruby to dtvem" - run: | - echo "=== Running migrate detection ===" - echo -e "1\n0\n" | ./dist/dtvem migrate ruby || true - echo "" - echo "=== Verifying migration ===" - ./dist/dtvem list ruby - - - name: "Verify migrated version" - run: | - ./dist/dtvem list ruby | grep -E "3\.2\." || (echo "ERROR: Expected Ruby 3.2.x to be migrated" && exit 1) - echo "SUCCESS: Ruby 3.2.x was migrated from system" - - - name: Generate summary - if: always() - run: | - echo "## Ruby Migration from System (macOS)" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "**Source:** Homebrew" >> $GITHUB_STEP_SUMMARY - echo "**Version:** 3.2.x" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Installed Versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dist/dtvem list ruby >> $GITHUB_STEP_SUMMARY 2>&1 || echo "No versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/integration-test-migrate-ruby-ubuntu-rbenv.yml b/.github/workflows/integration-test-migrate-ruby-ubuntu-rbenv.yml deleted file mode 100644 index 453067f..0000000 --- a/.github/workflows/integration-test-migrate-ruby-ubuntu-rbenv.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: Integration Tests - Migrate Ruby from rbenv (Ubuntu) - -on: - workflow_call: - workflow_dispatch: - -permissions: - contents: read - -jobs: - migrate: - name: Ruby from rbenv (Ubuntu) - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: '1.23' - cache: true - - - name: Build dtvem - run: | - go build -v -ldflags="-s -w" -o dist/dtvem ./src - go build -v -ldflags="-s -w" -o dist/dtvem-shim ./src/cmd/shim - - - name: Initialize dtvem - run: ./dist/dtvem init --yes - - - name: Add dtvem to PATH - run: | - echo "$HOME/.dtvem/shims" >> $GITHUB_PATH - echo "$HOME/.dtvem/bin" >> $GITHUB_PATH - - - name: "Install rbenv and ruby-build" - run: | - git clone https://github.com/rbenv/rbenv.git ~/.rbenv - echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc - echo 'eval "$(rbenv init -)"' >> ~/.bashrc - git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build - # Install Ruby build dependencies - sudo apt-get update - sudo apt-get install -y autoconf patch build-essential rustc libssl-dev libyaml-dev \ - libreadline6-dev zlib1g-dev libgmp-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev libdb-dev uuid-dev - - - name: "Install Ruby 3.3.6 via rbenv" - run: | - export PATH="$HOME/.rbenv/bin:$PATH" - eval "$(rbenv init -)" - rbenv install 3.3.6 - rbenv global 3.3.6 - echo "rbenv Ruby installed at: $(rbenv which ruby)" - ruby --version - - - name: "Migrate rbenv Ruby to dtvem" - run: | - echo "=== Running migrate detection ===" - # 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 - - - name: "Verify migrated version" - run: | - ./dist/dtvem list ruby | grep -E "3\.3\.6" || (echo "ERROR: Expected Ruby 3.3.6 to be migrated" && exit 1) - echo "SUCCESS: Ruby 3.3.6 was migrated from rbenv" - - - name: Generate summary - if: always() - run: | - echo "## Ruby Migration from rbenv (Ubuntu)" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "**Source:** rbenv" >> $GITHUB_STEP_SUMMARY - echo "**Version:** 3.3.6" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Installed Versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dist/dtvem list ruby >> $GITHUB_STEP_SUMMARY 2>&1 || echo "No versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/integration-test-migrate-ruby-ubuntu-system.yml b/.github/workflows/integration-test-migrate-ruby-ubuntu-system.yml deleted file mode 100644 index 3d398bf..0000000 --- a/.github/workflows/integration-test-migrate-ruby-ubuntu-system.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: Integration Tests - Migrate Ruby from System (Ubuntu) - -on: - workflow_call: - workflow_dispatch: - -permissions: - contents: read - -jobs: - migrate: - name: Ruby from System (Ubuntu) - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: '1.23' - cache: true - - - name: Build dtvem - run: | - go build -v -ldflags="-s -w" -o dist/dtvem ./src - go build -v -ldflags="-s -w" -o dist/dtvem-shim ./src/cmd/shim - - - name: Initialize dtvem - run: ./dist/dtvem init --yes - - - name: Add dtvem to PATH - run: | - echo "$HOME/.dtvem/shims" >> $GITHUB_PATH - echo "$HOME/.dtvem/bin" >> $GITHUB_PATH - - - name: "Install Ruby 3.2 via apt" - run: | - # Install Ruby via apt (system-level install) - sudo apt-get update - sudo apt-get install -y ruby-full - echo "System Ruby installed at: $(which ruby)" - ruby --version - - - name: "Migrate system Ruby to dtvem" - run: | - echo "=== Running migrate detection ===" - echo -e "1\n0\n" | ./dist/dtvem migrate ruby || true - echo "" - echo "=== Verifying migration ===" - ./dist/dtvem list ruby - - - name: "Verify migrated version" - run: | - ./dist/dtvem list ruby | grep -E "3\." || (echo "ERROR: Expected Ruby 3.x to be migrated" && exit 1) - echo "SUCCESS: Ruby 3.x was migrated from system" - - - name: Generate summary - if: always() - run: | - echo "## Ruby Migration from System (Ubuntu)" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "**Source:** apt" >> $GITHUB_STEP_SUMMARY - echo "**Version:** 3.x (system default)" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Installed Versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dist/dtvem list ruby >> $GITHUB_STEP_SUMMARY 2>&1 || echo "No versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/integration-test-migrate-ruby-windows-system.yml b/.github/workflows/integration-test-migrate-ruby-windows-system.yml deleted file mode 100644 index 15fc8f5..0000000 --- a/.github/workflows/integration-test-migrate-ruby-windows-system.yml +++ /dev/null @@ -1,87 +0,0 @@ -name: Integration Tests - Migrate Ruby from System (Windows) - -on: - workflow_call: - workflow_dispatch: - -permissions: - contents: read - -jobs: - migrate: - name: Ruby from System (Windows) - runs-on: windows-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: '1.23' - cache: true - - - name: Build dtvem - shell: bash - run: | - go build -v -ldflags="-s -w" -o dist/dtvem.exe ./src - go build -v -ldflags="-s -w" -o dist/dtvem-shim.exe ./src/cmd/shim - - - name: Initialize dtvem - shell: bash - run: ./dist/dtvem.exe init --yes - - - name: Add dtvem to PATH - shell: pwsh - run: | - "$env:USERPROFILE\.dtvem\shims" | Out-File -FilePath $env:GITHUB_PATH -Append - "$env:USERPROFILE\.dtvem\bin" | Out-File -FilePath $env:GITHUB_PATH -Append - - - name: "Install Ruby 3.2 via Chocolatey" - shell: pwsh - run: | - # Install Ruby via Chocolatey (system-level install) - choco install ruby --version=3.2.6.1 -y - $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") - Write-Host "System Ruby installed" - ruby --version - - - name: "Add Chocolatey Ruby to PATH" - shell: pwsh - run: | - # Ruby is typically installed to C:\tools\ruby32\bin - $rubyPath = "C:\tools\ruby32\bin" - if (Test-Path $rubyPath) { - $rubyPath | Out-File -FilePath $env:GITHUB_PATH -Append - } - - - name: "Migrate system Ruby to dtvem" - shell: bash - run: | - echo "=== Running migrate detection ===" - echo -e "1\n0\n" | ./dist/dtvem.exe migrate ruby || true - echo "" - echo "=== Verifying migration ===" - ./dist/dtvem.exe list ruby - - - name: "Verify migrated version" - shell: bash - run: | - ./dist/dtvem.exe list ruby | grep -E "3\.2\." || (echo "ERROR: Expected Ruby 3.2.x to be migrated" && exit 1) - echo "SUCCESS: Ruby 3.2.x was migrated from system" - - - name: Generate summary - if: always() - shell: bash - run: | - echo "## Ruby Migration from System (Windows)" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "**Source:** Chocolatey" >> $GITHUB_STEP_SUMMARY - echo "**Version:** 3.2.x" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "*Note: For version manager migration on Windows, see the uru integration test.*" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Installed Versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dist/dtvem.exe list ruby >> $GITHUB_STEP_SUMMARY 2>&1 || echo "No versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/integration-test-migrate-ruby-windows-uru.yml b/.github/workflows/integration-test-migrate-ruby-windows-uru.yml deleted file mode 100644 index a9eeb52..0000000 --- a/.github/workflows/integration-test-migrate-ruby-windows-uru.yml +++ /dev/null @@ -1,132 +0,0 @@ -name: Integration Tests - Migrate Ruby from uru (Windows) - -on: - workflow_call: - workflow_dispatch: - -permissions: - contents: read - -jobs: - migrate: - name: Ruby from uru (Windows) - runs-on: windows-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: '1.23' - cache: true - - - name: Build dtvem - shell: bash - run: | - go build -v -ldflags="-s -w" -o dist/dtvem.exe ./src - go build -v -ldflags="-s -w" -o dist/dtvem-shim.exe ./src/cmd/shim - - - name: Initialize dtvem - shell: bash - run: ./dist/dtvem.exe init --yes - - - name: Add dtvem to PATH - shell: pwsh - run: | - "$env:USERPROFILE\.dtvem\shims" | Out-File -FilePath $env:GITHUB_PATH -Append - "$env:USERPROFILE\.dtvem\bin" | Out-File -FilePath $env:GITHUB_PATH -Append - - - name: "Install Ruby 3.2 via Chocolatey" - shell: pwsh - run: | - # Install Ruby via Chocolatey (will be registered with uru) - choco install ruby --version=3.2.6.1 -y - $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") - Write-Host "Ruby installed at C:\tools\ruby32" - C:\tools\ruby32\bin\ruby.exe --version - - - name: "Install uru" - shell: pwsh - run: | - # Download uru from Bitbucket releases - $uruVersion = "0.8.5" - $uruUrl = "https://bitbucket.org/jonforums/uru/downloads/uru-$uruVersion-windows-x86.7z" - $uruArchive = "$env:TEMP\uru.7z" - $uruDir = "C:\tools\uru" - - # Create uru directory - New-Item -ItemType Directory -Force -Path $uruDir | Out-Null - - # Download uru - Write-Host "Downloading uru $uruVersion..." - Invoke-WebRequest -Uri $uruUrl -OutFile $uruArchive - - # Extract using 7z (available on GitHub runners) - Write-Host "Extracting uru..." - 7z x $uruArchive -o"$uruDir" -y - - # Add uru to PATH (for subsequent steps) - $uruDir | Out-File -FilePath $env:GITHUB_PATH -Append - # Also add to current PATH (GITHUB_PATH only affects subsequent steps) - $env:Path = "$uruDir;$env:Path" - - # Initialize uru (must run from same directory as uru_rt.exe) - Write-Host "Installing uru..." - Push-Location $uruDir - .\uru_rt.exe admin install - Pop-Location - - Write-Host "uru installed successfully" - - - name: "Register Ruby with uru" - shell: pwsh - run: | - # Register the Chocolatey Ruby with uru - Write-Host "Registering Ruby with uru..." - uru_rt.exe admin add C:\tools\ruby32\bin - Write-Host "" - Write-Host "Registered rubies:" - uru_rt.exe ls - - - name: "Verify uru rubies.json exists" - shell: pwsh - run: | - $rubiesJson = "$env:USERPROFILE\.uru\rubies.json" - if (Test-Path $rubiesJson) { - Write-Host "rubies.json found at: $rubiesJson" - Get-Content $rubiesJson - } else { - Write-Host "ERROR: rubies.json not found!" - exit 1 - } - - - name: "Migrate uru Ruby to dtvem" - shell: bash - run: | - echo "=== Running migrate detection ===" - # Select "all" to migrate all detected versions (uru may be second after system) - echo -e "all\n0\nn\n" | ./dist/dtvem.exe migrate ruby || true - echo "" - echo "=== Verifying migration ===" - ./dist/dtvem.exe list ruby - - - name: "Verify migrated version" - shell: bash - run: | - ./dist/dtvem.exe list ruby | grep -E "3\.2\." || (echo "ERROR: Expected Ruby 3.2.x to be migrated" && exit 1) - echo "SUCCESS: Ruby 3.2.x was migrated from uru" - - - name: Generate summary - if: always() - shell: bash - run: | - echo "## Ruby Migration from uru (Windows)" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "**Source:** uru" >> $GITHUB_STEP_SUMMARY - echo "**Version:** 3.2.x" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Installed Versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dist/dtvem.exe list ruby >> $GITHUB_STEP_SUMMARY 2>&1 || echo "No versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/integration-test-migrations-node.yml b/.github/workflows/integration-test-migrations-node.yml deleted file mode 100644 index e62578f..0000000 --- a/.github/workflows/integration-test-migrations-node.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Integration Tests - Node.js Migrations - -on: - workflow_dispatch: - # Manual trigger for testing Node.js migrations only - -permissions: - contents: read - -jobs: - # Ubuntu - migrate-node-ubuntu-system: - name: System (Ubuntu) - uses: ./.github/workflows/integration-test-migrate-node-ubuntu-system.yml - - migrate-node-ubuntu-nvm: - name: nvm (Ubuntu) - uses: ./.github/workflows/integration-test-migrate-node-ubuntu-nvm.yml - - # macOS - migrate-node-macos-system: - name: System (macOS) - uses: ./.github/workflows/integration-test-migrate-node-macos-system.yml - - migrate-node-macos-fnm: - name: fnm (macOS) - uses: ./.github/workflows/integration-test-migrate-node-macos-fnm.yml - - # Windows - migrate-node-windows-system: - name: System (Windows) - uses: ./.github/workflows/integration-test-migrate-node-windows-system.yml - - migrate-node-windows-nvm: - name: nvm-windows (Windows) - uses: ./.github/workflows/integration-test-migrate-node-windows-nvm.yml diff --git a/.github/workflows/integration-test-migrations-python.yml b/.github/workflows/integration-test-migrations-python.yml deleted file mode 100644 index 4c047e8..0000000 --- a/.github/workflows/integration-test-migrations-python.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Integration Tests - Python Migrations - -on: - workflow_dispatch: - # Manual trigger for testing Python migrations only - -permissions: - contents: read - -jobs: - # Ubuntu - migrate-python-ubuntu-system: - name: System (Ubuntu) - uses: ./.github/workflows/integration-test-migrate-python-ubuntu-system.yml - - migrate-python-ubuntu-pyenv: - name: pyenv (Ubuntu) - uses: ./.github/workflows/integration-test-migrate-python-ubuntu-pyenv.yml - - # macOS - migrate-python-macos-system: - name: System (macOS) - uses: ./.github/workflows/integration-test-migrate-python-macos-system.yml - - migrate-python-macos-pyenv: - name: pyenv (macOS) - uses: ./.github/workflows/integration-test-migrate-python-macos-pyenv.yml - - # Windows - migrate-python-windows-system: - name: System (Windows) - uses: ./.github/workflows/integration-test-migrate-python-windows-system.yml - - migrate-python-windows-pyenv: - name: pyenv-win (Windows) - uses: ./.github/workflows/integration-test-migrate-python-windows-pyenv.yml diff --git a/.github/workflows/integration-test-migrations-ruby.yml b/.github/workflows/integration-test-migrations-ruby.yml deleted file mode 100644 index dc6c1e5..0000000 --- a/.github/workflows/integration-test-migrations-ruby.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Integration Tests - Ruby Migrations - -on: - workflow_dispatch: - # Manual trigger for testing Ruby migrations only - -permissions: - contents: read - -jobs: - # Ubuntu - migrate-ruby-ubuntu-system: - name: System (Ubuntu) - uses: ./.github/workflows/integration-test-migrate-ruby-ubuntu-system.yml - - migrate-ruby-ubuntu-rbenv: - name: rbenv (Ubuntu) - uses: ./.github/workflows/integration-test-migrate-ruby-ubuntu-rbenv.yml - - # macOS - migrate-ruby-macos-system: - name: System (macOS) - uses: ./.github/workflows/integration-test-migrate-ruby-macos-system.yml - - migrate-ruby-macos-rbenv: - name: rbenv (macOS) - uses: ./.github/workflows/integration-test-migrate-ruby-macos-rbenv.yml - - # Windows - migrate-ruby-windows-system: - name: System (Windows) - uses: ./.github/workflows/integration-test-migrate-ruby-windows-system.yml - - migrate-ruby-windows-uru: - name: uru (Windows) - uses: ./.github/workflows/integration-test-migrate-ruby-windows-uru.yml diff --git a/.github/workflows/integration-test-migrations.yml b/.github/workflows/integration-test-migrations.yml index 2c096fc..810df56 100644 --- a/.github/workflows/integration-test-migrations.yml +++ b/.github/workflows/integration-test-migrations.yml @@ -13,78 +13,78 @@ jobs: # ========================================================================== migrate-node-ubuntu-system: name: Node.js - System (Ubuntu) - uses: ./.github/workflows/integration-test-migrate-node-ubuntu-system.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-node-ubuntu-system.yml@main migrate-node-ubuntu-nvm: name: Node.js - nvm (Ubuntu) - uses: ./.github/workflows/integration-test-migrate-node-ubuntu-nvm.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-node-ubuntu-nvm.yml@main migrate-node-macos-system: name: Node.js - System (macOS) - uses: ./.github/workflows/integration-test-migrate-node-macos-system.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-node-macos-system.yml@main migrate-node-macos-fnm: name: Node.js - fnm (macOS) - uses: ./.github/workflows/integration-test-migrate-node-macos-fnm.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-node-macos-fnm.yml@main migrate-node-windows-system: name: Node.js - System (Windows) - uses: ./.github/workflows/integration-test-migrate-node-windows-system.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-node-windows-system.yml@main migrate-node-windows-nvm: name: Node.js - nvm-windows (Windows) - uses: ./.github/workflows/integration-test-migrate-node-windows-nvm.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-node-windows-nvm.yml@main # ========================================================================== # Python Migrations # ========================================================================== migrate-python-ubuntu-system: name: Python - System (Ubuntu) - uses: ./.github/workflows/integration-test-migrate-python-ubuntu-system.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-python-ubuntu-system.yml@main migrate-python-ubuntu-pyenv: name: Python - pyenv (Ubuntu) - uses: ./.github/workflows/integration-test-migrate-python-ubuntu-pyenv.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-python-ubuntu-pyenv.yml@main migrate-python-macos-system: name: Python - System (macOS) - uses: ./.github/workflows/integration-test-migrate-python-macos-system.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-python-macos-system.yml@main migrate-python-macos-pyenv: name: Python - pyenv (macOS) - uses: ./.github/workflows/integration-test-migrate-python-macos-pyenv.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-python-macos-pyenv.yml@main migrate-python-windows-system: name: Python - System (Windows) - uses: ./.github/workflows/integration-test-migrate-python-windows-system.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-python-windows-system.yml@main migrate-python-windows-pyenv: name: Python - pyenv-win (Windows) - uses: ./.github/workflows/integration-test-migrate-python-windows-pyenv.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-python-windows-pyenv.yml@main # ========================================================================== # Ruby Migrations # ========================================================================== migrate-ruby-ubuntu-system: name: Ruby - System (Ubuntu) - uses: ./.github/workflows/integration-test-migrate-ruby-ubuntu-system.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-ruby-ubuntu-system.yml@main migrate-ruby-ubuntu-rbenv: name: Ruby - rbenv (Ubuntu) - uses: ./.github/workflows/integration-test-migrate-ruby-ubuntu-rbenv.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-ruby-ubuntu-rbenv.yml@main migrate-ruby-macos-system: name: Ruby - System (macOS) - uses: ./.github/workflows/integration-test-migrate-ruby-macos-system.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-ruby-macos-system.yml@main migrate-ruby-macos-rbenv: name: Ruby - rbenv (macOS) - uses: ./.github/workflows/integration-test-migrate-ruby-macos-rbenv.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-ruby-macos-rbenv.yml@main migrate-ruby-windows-system: name: Ruby - System (Windows) - uses: ./.github/workflows/integration-test-migrate-ruby-windows-system.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-ruby-windows-system.yml@main migrate-ruby-windows-uru: name: Ruby - uru (Windows) - uses: ./.github/workflows/integration-test-migrate-ruby-windows-uru.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-ruby-windows-uru.yml@main diff --git a/.github/workflows/integration-test-node.yml b/.github/workflows/integration-test-node.yml deleted file mode 100644 index 5673914..0000000 --- a/.github/workflows/integration-test-node.yml +++ /dev/null @@ -1,311 +0,0 @@ -name: Integration Tests - Node.js - -on: - workflow_call: - inputs: - version1: - description: 'First Node.js version to test (LTS)' - required: false - type: string - default: '20.18.0' - version2: - description: 'Second Node.js version to test (Current)' - required: false - type: string - default: '22.11.0' - workflow_dispatch: - inputs: - version1: - description: 'First Node.js version to test (LTS)' - required: false - type: string - default: '20.18.0' - version2: - description: 'Second Node.js version to test (Current)' - required: false - type: string - default: '22.11.0' - -permissions: - contents: read - -jobs: - integration-test-node: - name: Node.js (${{ matrix.os }}) - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-latest - platform: linux - ext: "" - version1: "20.18.0" - version2: "22.11.0" - - os: macos-latest - platform: macos - ext: "" - version1: "20.18.0" - version2: "22.11.0" - - os: windows-latest - platform: windows - ext: ".exe" - version1: "20.18.0" - version2: "22.11.0" - env: - # Run tests from a directory outside the repo to avoid picking up .dtvem/runtimes.json - TEST_WORKSPACE: ${{ github.workspace }}/../dtvem-test-workspace - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: '1.23' - cache: true - - - name: Build dtvem - run: | - go build -v -ldflags="-s -w" -o dist/dtvem${{ matrix.ext }} ./src - go build -v -ldflags="-s -w" -o dist/dtvem-shim${{ matrix.ext }} ./src/cmd/shim - shell: bash - - - name: Initialize dtvem - run: | - ./dist/dtvem${{ matrix.ext }} init --yes - shell: bash - - - name: Add shims to PATH (Unix) - if: matrix.platform != 'windows' - run: | - # Linux uses XDG path (~/.local/share/dtvem), macOS uses ~/.dtvem - if [[ "$RUNNER_OS" == "Linux" ]]; then - DTVEM_ROOT="${XDG_DATA_HOME:-$HOME/.local/share}/dtvem" - else - DTVEM_ROOT="$HOME/.dtvem" - fi - echo "$DTVEM_ROOT/shims" >> $GITHUB_PATH - echo "$DTVEM_ROOT/bin" >> $GITHUB_PATH - - - name: Add shims to PATH (Windows) - if: matrix.platform == 'windows' - shell: pwsh - run: | - "$env:USERPROFILE\.dtvem\shims" | Out-File -FilePath $env:GITHUB_PATH -Append - "$env:USERPROFILE\.dtvem\bin" | Out-File -FilePath $env:GITHUB_PATH -Append - - - name: Set up test workspace - run: | - mkdir -p "$TEST_WORKSPACE" - cp ./dist/dtvem${{ matrix.ext }} "$TEST_WORKSPACE/" - cp ./dist/dtvem-shim${{ matrix.ext }} "$TEST_WORKSPACE/" - shell: bash - - - name: "List available versions and verify test versions exist" - run: | - cd "$TEST_WORKSPACE" - echo "## Node.js Available Versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dtvem${{ matrix.ext }} list-all node | head -20 >> $GITHUB_STEP_SUMMARY || true - echo '```' >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - - # Verify test versions are available using --filter and stripping ANSI codes - echo "Verifying test versions are available..." - - # Check version1 - FILTERED=$(./dtvem${{ matrix.ext }} list-all node --filter "${{ matrix.version1 }}" 2>&1 | sed 's/\x1B\[[0-9;]*[a-zA-Z]//g') - if ! echo "$FILTERED" | grep -qF "${{ matrix.version1 }}"; then - echo "ERROR: Version ${{ matrix.version1 }} not found in available versions" - echo "Filtered output: $FILTERED" - exit 1 - fi - echo "✓ Version ${{ matrix.version1 }} is available" - - # Check version2 - FILTERED=$(./dtvem${{ matrix.ext }} list-all node --filter "${{ matrix.version2 }}" 2>&1 | sed 's/\x1B\[[0-9;]*[a-zA-Z]//g') - if ! echo "$FILTERED" | grep -qF "${{ matrix.version2 }}"; then - echo "ERROR: Version ${{ matrix.version2 }} not found in available versions" - echo "Filtered output: $FILTERED" - exit 1 - fi - echo "✓ Version ${{ matrix.version2 }} is available" - - echo "✓ Both versions ${{ matrix.version1 }} and ${{ matrix.version2 }} are available" - shell: bash - - - name: "Install version ${{ matrix.version1 }}" - run: | - cd "$TEST_WORKSPACE" - ./dtvem${{ matrix.ext }} install node ${{ matrix.version1 }} - shell: bash - - - name: "Install version ${{ matrix.version2 }}" - run: | - cd "$TEST_WORKSPACE" - ./dtvem${{ matrix.ext }} install node ${{ matrix.version2 }} - shell: bash - - - name: "List installed versions" - run: | - cd "$TEST_WORKSPACE" - echo "## Node.js Installed Versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dtvem${{ matrix.ext }} list node >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - shell: bash - - - name: "Set global version to ${{ matrix.version1 }}" - run: | - cd "$TEST_WORKSPACE" - ./dtvem${{ matrix.ext }} global node ${{ matrix.version1 }} - shell: bash - - - name: "Verify global version via current" - run: | - cd "$TEST_WORKSPACE" - CURRENT=$(./dtvem${{ matrix.ext }} current node --no-install) - echo "Current node version: $CURRENT" - if [[ "$CURRENT" != *"${{ matrix.version1 }}"* ]]; then - echo "ERROR: Expected ${{ matrix.version1 }} but got $CURRENT" - exit 1 - fi - shell: bash - - - name: "Verify shim works (node --version)" - run: | - cd "$TEST_WORKSPACE" - NODE_VERSION=$(node --version) - echo "Node version from shim: $NODE_VERSION" - if [[ "$NODE_VERSION" != *"${{ matrix.version1 }}"* ]]; then - echo "ERROR: Expected v${{ matrix.version1 }} but got $NODE_VERSION" - exit 1 - fi - shell: bash - - - name: "Switch global version to ${{ matrix.version2 }}" - run: | - cd "$TEST_WORKSPACE" - ./dtvem${{ matrix.ext }} global node ${{ matrix.version2 }} - shell: bash - - - name: "Verify version switched" - run: | - cd "$TEST_WORKSPACE" - NODE_VERSION=$(node --version) - echo "Node version from shim: $NODE_VERSION" - if [[ "$NODE_VERSION" != *"${{ matrix.version2 }}"* ]]; then - echo "ERROR: Expected v${{ matrix.version2 }} but got $NODE_VERSION" - exit 1 - fi - shell: bash - - - name: "Test local version override" - run: | - cd "$TEST_WORKSPACE" - mkdir -p test-project - cd test-project - ../dtvem${{ matrix.ext }} local node ${{ matrix.version1 }} - CURRENT=$(../dtvem${{ matrix.ext }} current node --no-install) - echo "Current node version in test-project: $CURRENT" - if [[ "$CURRENT" != *"${{ matrix.version1 }}"* ]]; then - echo "ERROR: Local override failed. Expected ${{ matrix.version1 }} but got $CURRENT" - exit 1 - fi - NODE_VERSION=$(node --version) - echo "Node version from shim in test-project: $NODE_VERSION" - if [[ "$NODE_VERSION" != *"${{ matrix.version1 }}"* ]]; then - echo "ERROR: Expected v${{ matrix.version1 }} but got $NODE_VERSION" - exit 1 - fi - shell: bash - - - name: "Test which command" - run: | - cd "$TEST_WORKSPACE" - echo "## Node.js Which" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dtvem${{ matrix.ext }} which node >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - shell: bash - - - name: "Test where command" - run: | - cd "$TEST_WORKSPACE" - echo "## Node.js Where" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dtvem${{ matrix.ext }} where node >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - shell: bash - - - name: "Test reshim command" - run: | - cd "$TEST_WORKSPACE" - ./dtvem${{ matrix.ext }} reshim - echo "Reshim completed successfully" - shell: bash - - - name: "Test freeze command" - run: | - cd "$TEST_WORKSPACE" - echo "## Freeze Output" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dtvem${{ matrix.ext }} freeze >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - shell: bash - - - name: "Switch global back to ${{ matrix.version1 }} before uninstall" - run: | - cd "$TEST_WORKSPACE" - ./dtvem${{ matrix.ext }} global node ${{ matrix.version1 }} - shell: bash - - - name: "Uninstall version ${{ matrix.version2 }}" - run: | - cd "$TEST_WORKSPACE" - ./dtvem${{ matrix.ext }} uninstall node ${{ matrix.version2 }} --yes - shell: bash - - - name: "Verify uninstall" - run: | - cd "$TEST_WORKSPACE" - LIST_OUTPUT=$(./dtvem${{ matrix.ext }} list node) - echo "Installed versions after uninstall:" - echo "$LIST_OUTPUT" - if [[ "$LIST_OUTPUT" == *"${{ matrix.version2 }}"* ]]; then - echo "ERROR: Version ${{ matrix.version2 }} should have been uninstalled" - exit 1 - fi - shell: bash - - - name: Generate summary - if: always() - run: | - echo "" >> $GITHUB_STEP_SUMMARY - echo "---" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "## Node.js Integration Test Summary" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "| Command | Status |" >> $GITHUB_STEP_SUMMARY - echo "|---------|--------|" >> $GITHUB_STEP_SUMMARY - echo "| list-all | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| install | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| list | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| global | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| current | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| shim execution | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| local override | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| which | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| where | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| reshim | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| freeze | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| uninstall | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "Platform: **${{ matrix.platform }}** (${{ matrix.os }})" >> $GITHUB_STEP_SUMMARY - shell: bash diff --git a/.github/workflows/integration-test-python.yml b/.github/workflows/integration-test-python.yml deleted file mode 100644 index 109c7f2..0000000 --- a/.github/workflows/integration-test-python.yml +++ /dev/null @@ -1,312 +0,0 @@ -name: Integration Tests - Python - -on: - workflow_call: - inputs: - version1: - description: 'First Python version to test' - required: false - type: string - default: '3.11.9' - version2: - description: 'Second Python version to test' - required: false - type: string - default: '3.12.7' - workflow_dispatch: - inputs: - version1: - description: 'First Python version to test' - required: false - type: string - default: '3.11.9' - version2: - description: 'Second Python version to test' - required: false - type: string - default: '3.12.7' - -permissions: - contents: read - -jobs: - integration-test-python: - name: Python (${{ matrix.os }}) - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-latest - platform: linux - ext: "" - # Use Python versions available in both python.org and python-build-standalone (20240814) - version1: "3.11.9" - version2: "3.12.5" - - os: macos-latest - platform: macos - ext: "" - version1: "3.11.9" - version2: "3.12.5" - - os: windows-latest - platform: windows - ext: ".exe" - version1: "3.11.9" - version2: "3.12.5" - env: - # Run tests from a directory outside the repo to avoid picking up .dtvem/runtimes.json - TEST_WORKSPACE: ${{ github.workspace }}/../dtvem-test-workspace - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: '1.23' - cache: true - - - name: Build dtvem - run: | - go build -v -ldflags="-s -w" -o dist/dtvem${{ matrix.ext }} ./src - go build -v -ldflags="-s -w" -o dist/dtvem-shim${{ matrix.ext }} ./src/cmd/shim - shell: bash - - - name: Initialize dtvem - run: | - ./dist/dtvem${{ matrix.ext }} init --yes - shell: bash - - - name: Add shims to PATH (Unix) - if: matrix.platform != 'windows' - run: | - # Linux uses XDG path (~/.local/share/dtvem), macOS uses ~/.dtvem - if [[ "$RUNNER_OS" == "Linux" ]]; then - DTVEM_ROOT="${XDG_DATA_HOME:-$HOME/.local/share}/dtvem" - else - DTVEM_ROOT="$HOME/.dtvem" - fi - echo "$DTVEM_ROOT/shims" >> $GITHUB_PATH - echo "$DTVEM_ROOT/bin" >> $GITHUB_PATH - - - name: Add shims to PATH (Windows) - if: matrix.platform == 'windows' - shell: pwsh - run: | - "$env:USERPROFILE\.dtvem\shims" | Out-File -FilePath $env:GITHUB_PATH -Append - "$env:USERPROFILE\.dtvem\bin" | Out-File -FilePath $env:GITHUB_PATH -Append - - - name: Set up test workspace - run: | - mkdir -p "$TEST_WORKSPACE" - cp ./dist/dtvem${{ matrix.ext }} "$TEST_WORKSPACE/" - cp ./dist/dtvem-shim${{ matrix.ext }} "$TEST_WORKSPACE/" - shell: bash - - - name: "List available versions and verify test versions exist" - run: | - cd "$TEST_WORKSPACE" - echo "## Python Available Versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dtvem${{ matrix.ext }} list-all python | head -20 >> $GITHUB_STEP_SUMMARY || true - echo '```' >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - - # Verify test versions are available using --filter and stripping ANSI codes - echo "Verifying test versions are available..." - - # Check version1 - FILTERED=$(./dtvem${{ matrix.ext }} list-all python --filter "${{ matrix.version1 }}" 2>&1 | sed 's/\x1B\[[0-9;]*[a-zA-Z]//g') - if ! echo "$FILTERED" | grep -qF "${{ matrix.version1 }}"; then - echo "ERROR: Version ${{ matrix.version1 }} not found in available versions" - echo "Filtered output: $FILTERED" - exit 1 - fi - echo "✓ Version ${{ matrix.version1 }} is available" - - # Check version2 - FILTERED=$(./dtvem${{ matrix.ext }} list-all python --filter "${{ matrix.version2 }}" 2>&1 | sed 's/\x1B\[[0-9;]*[a-zA-Z]//g') - if ! echo "$FILTERED" | grep -qF "${{ matrix.version2 }}"; then - echo "ERROR: Version ${{ matrix.version2 }} not found in available versions" - echo "Filtered output: $FILTERED" - exit 1 - fi - echo "✓ Version ${{ matrix.version2 }} is available" - - echo "✓ Both versions ${{ matrix.version1 }} and ${{ matrix.version2 }} are available" - shell: bash - - - name: "Install version ${{ matrix.version1 }}" - run: | - cd "$TEST_WORKSPACE" - ./dtvem${{ matrix.ext }} install python ${{ matrix.version1 }} - shell: bash - - - name: "Install version ${{ matrix.version2 }}" - run: | - cd "$TEST_WORKSPACE" - ./dtvem${{ matrix.ext }} install python ${{ matrix.version2 }} - shell: bash - - - name: "List installed versions" - run: | - cd "$TEST_WORKSPACE" - echo "## Python Installed Versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dtvem${{ matrix.ext }} list python >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - shell: bash - - - name: "Set global version to ${{ matrix.version1 }}" - run: | - cd "$TEST_WORKSPACE" - ./dtvem${{ matrix.ext }} global python ${{ matrix.version1 }} - shell: bash - - - name: "Verify global version via current" - run: | - cd "$TEST_WORKSPACE" - CURRENT=$(./dtvem${{ matrix.ext }} current python --no-install) - echo "Current python version: $CURRENT" - if [[ "$CURRENT" != *"${{ matrix.version1 }}"* ]]; then - echo "ERROR: Expected ${{ matrix.version1 }} but got $CURRENT" - exit 1 - fi - shell: bash - - - name: "Verify shim works (python --version)" - run: | - cd "$TEST_WORKSPACE" - PYTHON_VERSION=$(python --version) - echo "Python version from shim: $PYTHON_VERSION" - if [[ "$PYTHON_VERSION" != *"${{ matrix.version1 }}"* ]]; then - echo "ERROR: Expected Python ${{ matrix.version1 }} but got $PYTHON_VERSION" - exit 1 - fi - shell: bash - - - name: "Switch global version to ${{ matrix.version2 }}" - run: | - cd "$TEST_WORKSPACE" - ./dtvem${{ matrix.ext }} global python ${{ matrix.version2 }} - shell: bash - - - name: "Verify version switched" - run: | - cd "$TEST_WORKSPACE" - PYTHON_VERSION=$(python --version) - echo "Python version from shim: $PYTHON_VERSION" - if [[ "$PYTHON_VERSION" != *"${{ matrix.version2 }}"* ]]; then - echo "ERROR: Expected Python ${{ matrix.version2 }} but got $PYTHON_VERSION" - exit 1 - fi - shell: bash - - - name: "Test local version override" - run: | - cd "$TEST_WORKSPACE" - mkdir -p test-project - cd test-project - ../dtvem${{ matrix.ext }} local python ${{ matrix.version1 }} - CURRENT=$(../dtvem${{ matrix.ext }} current python --no-install) - echo "Current python version in test-project: $CURRENT" - if [[ "$CURRENT" != *"${{ matrix.version1 }}"* ]]; then - echo "ERROR: Local override failed. Expected ${{ matrix.version1 }} but got $CURRENT" - exit 1 - fi - PYTHON_VERSION=$(python --version) - echo "Python version from shim in test-project: $PYTHON_VERSION" - if [[ "$PYTHON_VERSION" != *"${{ matrix.version1 }}"* ]]; then - echo "ERROR: Expected Python ${{ matrix.version1 }} but got $PYTHON_VERSION" - exit 1 - fi - shell: bash - - - name: "Test which command" - run: | - cd "$TEST_WORKSPACE" - echo "## Python Which" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dtvem${{ matrix.ext }} which python >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - shell: bash - - - name: "Test where command" - run: | - cd "$TEST_WORKSPACE" - echo "## Python Where" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dtvem${{ matrix.ext }} where python >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - shell: bash - - - name: "Test reshim command" - run: | - cd "$TEST_WORKSPACE" - ./dtvem${{ matrix.ext }} reshim - echo "Reshim completed successfully" - shell: bash - - - name: "Test freeze command" - run: | - cd "$TEST_WORKSPACE" - echo "## Freeze Output" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dtvem${{ matrix.ext }} freeze >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - shell: bash - - - name: "Switch global back to ${{ matrix.version1 }} before uninstall" - run: | - cd "$TEST_WORKSPACE" - ./dtvem${{ matrix.ext }} global python ${{ matrix.version1 }} - shell: bash - - - name: "Uninstall version ${{ matrix.version2 }}" - run: | - cd "$TEST_WORKSPACE" - ./dtvem${{ matrix.ext }} uninstall python ${{ matrix.version2 }} --yes - shell: bash - - - name: "Verify uninstall" - run: | - cd "$TEST_WORKSPACE" - LIST_OUTPUT=$(./dtvem${{ matrix.ext }} list python) - echo "Installed versions after uninstall:" - echo "$LIST_OUTPUT" - if [[ "$LIST_OUTPUT" == *"${{ matrix.version2 }}"* ]]; then - echo "ERROR: Version ${{ matrix.version2 }} should have been uninstalled" - exit 1 - fi - shell: bash - - - name: Generate summary - if: always() - run: | - echo "" >> $GITHUB_STEP_SUMMARY - echo "---" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "## Python Integration Test Summary" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "| Command | Status |" >> $GITHUB_STEP_SUMMARY - echo "|---------|--------|" >> $GITHUB_STEP_SUMMARY - echo "| list-all | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| install | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| list | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| global | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| current | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| shim execution | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| local override | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| which | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| where | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| reshim | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| freeze | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| uninstall | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "Platform: **${{ matrix.platform }}** (${{ matrix.os }})" >> $GITHUB_STEP_SUMMARY - shell: bash diff --git a/.github/workflows/integration-test-ruby.yml b/.github/workflows/integration-test-ruby.yml deleted file mode 100644 index a203c63..0000000 --- a/.github/workflows/integration-test-ruby.yml +++ /dev/null @@ -1,322 +0,0 @@ -name: Integration Tests - Ruby - -on: - workflow_call: - inputs: - version1: - description: 'First Ruby version to test' - required: false - type: string - default: '3.3.6' - version2: - description: 'Second Ruby version to test' - required: false - type: string - default: '3.4.1' - workflow_dispatch: - inputs: - version1: - description: 'First Ruby version to test' - required: false - type: string - default: '3.3.6' - version2: - description: 'Second Ruby version to test' - required: false - type: string - default: '3.4.1' - -permissions: - contents: read - -jobs: - integration-test-ruby: - name: Ruby (${{ matrix.os }}) - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-latest - platform: linux - ext: "" - # Use Ruby versions available in ruby/ruby-builder toolcache release - version1: "3.3.6" - version2: "3.4.1" - - os: macos-latest - platform: macos - ext: "" - version1: "3.3.6" - version2: "3.4.1" - - os: windows-latest - platform: windows - ext: ".exe" - version1: "3.3.6" - version2: "3.4.1" - env: - # Run tests from a directory outside the repo to avoid picking up .dtvem/runtimes.json - TEST_WORKSPACE: ${{ github.workspace }}/../dtvem-test-workspace - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: '1.23' - cache: true - - - name: Build dtvem - run: | - go build -v -ldflags="-s -w" -o dist/dtvem${{ matrix.ext }} ./src - go build -v -ldflags="-s -w" -o dist/dtvem-shim${{ matrix.ext }} ./src/cmd/shim - shell: bash - - - name: Initialize dtvem - run: | - ./dist/dtvem${{ matrix.ext }} init --yes - shell: bash - - - name: Add shims to PATH (Unix) - if: matrix.platform != 'windows' - run: | - # Linux uses XDG path (~/.local/share/dtvem), macOS uses ~/.dtvem - if [[ "$RUNNER_OS" == "Linux" ]]; then - DTVEM_ROOT="${XDG_DATA_HOME:-$HOME/.local/share}/dtvem" - else - DTVEM_ROOT="$HOME/.dtvem" - fi - echo "$DTVEM_ROOT/shims" >> $GITHUB_PATH - echo "$DTVEM_ROOT/bin" >> $GITHUB_PATH - - - name: Add shims to PATH (Windows) - if: matrix.platform == 'windows' - shell: pwsh - run: | - "$env:USERPROFILE\.dtvem\shims" | Out-File -FilePath $env:GITHUB_PATH -Append - "$env:USERPROFILE\.dtvem\bin" | Out-File -FilePath $env:GITHUB_PATH -Append - - - name: Set up test workspace - run: | - mkdir -p "$TEST_WORKSPACE" - cp ./dist/dtvem${{ matrix.ext }} "$TEST_WORKSPACE/" - cp ./dist/dtvem-shim${{ matrix.ext }} "$TEST_WORKSPACE/" - shell: bash - - - name: "List available versions and verify test versions exist" - run: | - cd "$TEST_WORKSPACE" - echo "## Ruby Available Versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dtvem${{ matrix.ext }} list-all ruby | head -20 >> $GITHUB_STEP_SUMMARY || true - echo '```' >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - - # Verify test versions are available using --filter and stripping ANSI codes - echo "Verifying test versions are available..." - - # 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" - exit 1 - fi - echo "✓ Version ${{ matrix.version1 }} is available" - - # 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" - exit 1 - fi - echo "✓ Version ${{ matrix.version2 }} is available" - - echo "✓ Both versions ${{ matrix.version1 }} and ${{ matrix.version2 }} are available" - shell: bash - - - name: "Install version ${{ matrix.version1 }}" - run: | - cd "$TEST_WORKSPACE" - ./dtvem${{ matrix.ext }} install ruby ${{ matrix.version1 }} - shell: bash - - - name: "Install version ${{ matrix.version2 }}" - run: | - cd "$TEST_WORKSPACE" - ./dtvem${{ matrix.ext }} install ruby ${{ matrix.version2 }} - shell: bash - - - name: "List installed versions" - run: | - cd "$TEST_WORKSPACE" - echo "## Ruby Installed Versions" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dtvem${{ matrix.ext }} list ruby >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - shell: bash - - - name: "Set global version to ${{ matrix.version1 }}" - run: | - cd "$TEST_WORKSPACE" - ./dtvem${{ matrix.ext }} global ruby ${{ matrix.version1 }} - shell: bash - - - name: "Verify global version via current" - run: | - cd "$TEST_WORKSPACE" - CURRENT=$(./dtvem${{ matrix.ext }} current ruby --no-install) - echo "Current ruby version: $CURRENT" - if [[ "$CURRENT" != *"${{ matrix.version1 }}"* ]]; then - echo "ERROR: Expected ${{ matrix.version1 }} but got $CURRENT" - exit 1 - fi - shell: bash - - - name: "Verify shim works (ruby --version)" - run: | - cd "$TEST_WORKSPACE" - RUBY_VERSION=$(ruby --version) - echo "Ruby version from shim: $RUBY_VERSION" - if [[ "$RUBY_VERSION" != *"${{ matrix.version1 }}"* ]]; then - echo "ERROR: Expected ruby ${{ matrix.version1 }} but got $RUBY_VERSION" - exit 1 - fi - shell: bash - - - name: "Switch global version to ${{ matrix.version2 }}" - run: | - cd "$TEST_WORKSPACE" - ./dtvem${{ matrix.ext }} global ruby ${{ matrix.version2 }} - shell: bash - - - name: "Verify version switched" - run: | - cd "$TEST_WORKSPACE" - RUBY_VERSION=$(ruby --version) - echo "Ruby version from shim: $RUBY_VERSION" - if [[ "$RUBY_VERSION" != *"${{ matrix.version2 }}"* ]]; then - echo "ERROR: Expected ruby ${{ matrix.version2 }} but got $RUBY_VERSION" - exit 1 - fi - shell: bash - - - name: "Test local version override" - run: | - cd "$TEST_WORKSPACE" - mkdir -p test-project - cd test-project - ../dtvem${{ matrix.ext }} local ruby ${{ matrix.version1 }} - CURRENT=$(../dtvem${{ matrix.ext }} current ruby --no-install) - echo "Current ruby version in test-project: $CURRENT" - if [[ "$CURRENT" != *"${{ matrix.version1 }}"* ]]; then - echo "ERROR: Local override failed. Expected ${{ matrix.version1 }} but got $CURRENT" - exit 1 - fi - RUBY_VERSION=$(ruby --version) - echo "Ruby version from shim in test-project: $RUBY_VERSION" - if [[ "$RUBY_VERSION" != *"${{ matrix.version1 }}"* ]]; then - echo "ERROR: Expected ruby ${{ matrix.version1 }} but got $RUBY_VERSION" - exit 1 - fi - shell: bash - - - name: "Test which command" - run: | - cd "$TEST_WORKSPACE" - echo "## Ruby Which" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dtvem${{ matrix.ext }} which ruby >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - shell: bash - - - name: "Test where command" - run: | - cd "$TEST_WORKSPACE" - echo "## Ruby Where" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dtvem${{ matrix.ext }} where ruby >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - shell: bash - - - name: "Test reshim command" - run: | - cd "$TEST_WORKSPACE" - ./dtvem${{ matrix.ext }} reshim - echo "Reshim completed successfully" - shell: bash - - - name: "Test freeze command" - run: | - cd "$TEST_WORKSPACE" - echo "## Freeze Output" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - ./dtvem${{ matrix.ext }} freeze >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - shell: bash - - - name: "Switch global back to ${{ matrix.version1 }} before uninstall" - run: | - cd "$TEST_WORKSPACE" - ./dtvem${{ matrix.ext }} global ruby ${{ matrix.version1 }} - shell: bash - - - name: "Uninstall version ${{ matrix.version2 }}" - run: | - cd "$TEST_WORKSPACE" - ./dtvem${{ matrix.ext }} uninstall ruby ${{ matrix.version2 }} --yes - shell: bash - - - name: "Verify uninstall" - run: | - cd "$TEST_WORKSPACE" - LIST_OUTPUT=$(./dtvem${{ matrix.ext }} list ruby) - echo "Installed versions after uninstall:" - echo "$LIST_OUTPUT" - if [[ "$LIST_OUTPUT" == *"${{ matrix.version2 }}"* ]]; then - echo "ERROR: Version ${{ matrix.version2 }} should have been uninstalled" - exit 1 - fi - shell: bash - - - name: Generate summary - if: always() - run: | - echo "" >> $GITHUB_STEP_SUMMARY - echo "---" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "## Ruby Integration Test Summary" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "| Command | Status |" >> $GITHUB_STEP_SUMMARY - echo "|---------|--------|" >> $GITHUB_STEP_SUMMARY - echo "| list-all | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| install | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| list | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| global | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| current | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| shim execution | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| local override | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| which | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| where | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| reshim | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| freeze | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "| uninstall | ✅ |" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "Platform: **${{ matrix.platform }}** (${{ matrix.os }})" >> $GITHUB_STEP_SUMMARY - shell: bash diff --git a/.github/workflows/integration-test-runtimes.yml b/.github/workflows/integration-test-runtimes.yml index 5f36566..84ed475 100644 --- a/.github/workflows/integration-test-runtimes.yml +++ b/.github/workflows/integration-test-runtimes.yml @@ -10,21 +10,21 @@ permissions: jobs: node: name: Node.js - uses: ./.github/workflows/integration-test-node.yml + uses: dtvem/.github/.github/workflows/integration-test-node.yml@main with: version1: '20.18.0' version2: '22.11.0' python: name: Python - uses: ./.github/workflows/integration-test-python.yml + uses: dtvem/.github/.github/workflows/integration-test-python.yml@main with: version1: '3.11.9' version2: '3.12.7' ruby: name: Ruby - uses: ./.github/workflows/integration-test-ruby.yml + uses: dtvem/.github/.github/workflows/integration-test-ruby.yml@main with: version1: '3.3.6' version2: '3.4.1' diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 687fac3..3f77109 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -16,21 +16,21 @@ jobs: # ========================================================================== node: name: Node.js - uses: ./.github/workflows/integration-test-node.yml + uses: dtvem/.github/.github/workflows/integration-test-node.yml@main with: version1: '20.18.0' version2: '22.11.0' python: name: Python - uses: ./.github/workflows/integration-test-python.yml + uses: dtvem/.github/.github/workflows/integration-test-python.yml@main with: version1: '3.11.9' version2: '3.12.7' ruby: name: Ruby - uses: ./.github/workflows/integration-test-ruby.yml + uses: dtvem/.github/.github/workflows/integration-test-ruby.yml@main with: version1: '3.3.6' version2: '3.4.1' @@ -40,72 +40,72 @@ jobs: # ========================================================================== migrate-node-ubuntu-system: name: Migrate Node.js from System (Ubuntu) - uses: ./.github/workflows/integration-test-migrate-node-ubuntu-system.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-node-ubuntu-system.yml@main migrate-node-ubuntu-nvm: name: Migrate Node.js from nvm (Ubuntu) - uses: ./.github/workflows/integration-test-migrate-node-ubuntu-nvm.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-node-ubuntu-nvm.yml@main migrate-node-macos-system: name: Migrate Node.js from System (macOS) - uses: ./.github/workflows/integration-test-migrate-node-macos-system.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-node-macos-system.yml@main migrate-node-windows-system: name: Migrate Node.js from System (Windows) - uses: ./.github/workflows/integration-test-migrate-node-windows-system.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-node-windows-system.yml@main migrate-node-macos-fnm: name: Migrate Node.js from fnm (macOS) - uses: ./.github/workflows/integration-test-migrate-node-macos-fnm.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-node-macos-fnm.yml@main migrate-node-windows-nvm: name: Migrate Node.js from nvm-windows (Windows) - uses: ./.github/workflows/integration-test-migrate-node-windows-nvm.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-node-windows-nvm.yml@main migrate-python-ubuntu-system: name: Migrate Python from System (Ubuntu) - uses: ./.github/workflows/integration-test-migrate-python-ubuntu-system.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-python-ubuntu-system.yml@main migrate-python-ubuntu-pyenv: name: Migrate Python from pyenv (Ubuntu) - uses: ./.github/workflows/integration-test-migrate-python-ubuntu-pyenv.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-python-ubuntu-pyenv.yml@main migrate-python-macos-system: name: Migrate Python from System (macOS) - uses: ./.github/workflows/integration-test-migrate-python-macos-system.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-python-macos-system.yml@main migrate-python-macos-pyenv: name: Migrate Python from pyenv (macOS) - uses: ./.github/workflows/integration-test-migrate-python-macos-pyenv.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-python-macos-pyenv.yml@main migrate-python-windows-system: name: Migrate Python from System (Windows) - uses: ./.github/workflows/integration-test-migrate-python-windows-system.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-python-windows-system.yml@main migrate-python-windows-pyenv: name: Migrate Python from pyenv-win (Windows) - uses: ./.github/workflows/integration-test-migrate-python-windows-pyenv.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-python-windows-pyenv.yml@main migrate-ruby-ubuntu-system: name: Migrate Ruby from System (Ubuntu) - uses: ./.github/workflows/integration-test-migrate-ruby-ubuntu-system.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-ruby-ubuntu-system.yml@main migrate-ruby-ubuntu-rbenv: name: Migrate Ruby from rbenv (Ubuntu) - uses: ./.github/workflows/integration-test-migrate-ruby-ubuntu-rbenv.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-ruby-ubuntu-rbenv.yml@main migrate-ruby-macos-system: name: Migrate Ruby from System (macOS) - uses: ./.github/workflows/integration-test-migrate-ruby-macos-system.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-ruby-macos-system.yml@main migrate-ruby-macos-rbenv: name: Migrate Ruby from rbenv (macOS) - uses: ./.github/workflows/integration-test-migrate-ruby-macos-rbenv.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-ruby-macos-rbenv.yml@main migrate-ruby-windows-system: name: Migrate Ruby from System (Windows) - uses: ./.github/workflows/integration-test-migrate-ruby-windows-system.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-ruby-windows-system.yml@main migrate-ruby-windows-uru: name: Migrate Ruby from uru (Windows) - uses: ./.github/workflows/integration-test-migrate-ruby-windows-uru.yml + uses: dtvem/.github/.github/workflows/integration-test-migrate-ruby-windows-uru.yml@main