Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/workflows/integration-test-migrate-node-macos-system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ jobs:
echo "$HOME/.dtvem/shims" >> $GITHUB_PATH
echo "$HOME/.dtvem/bin" >> $GITHUB_PATH

- name: "Install Node.js 18.x via Homebrew"
- name: "Verify pre-installed Node.js"
run: |
brew install node@18
brew link --overwrite node@18
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: |
Expand All @@ -51,16 +52,17 @@ jobs:

- name: "Verify migrated version"
run: |
./dist/dtvem list node | grep -E "18\." || (echo "ERROR: Expected Node.js 18.x to be migrated" && exit 1)
echo "SUCCESS: Node.js 18.x was migrated from system"
# 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:** Homebrew" >> $GITHUB_STEP_SUMMARY
echo "**Version:** 18.x" >> $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
Expand Down
26 changes: 10 additions & 16 deletions .github/workflows/integration-test-migrate-node-windows-system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,14 @@ jobs:
"$env:USERPROFILE\.dtvem\shims" | Out-File -FilePath $env:GITHUB_PATH -Append
"$env:USERPROFILE\.dtvem\bin" | Out-File -FilePath $env:GITHUB_PATH -Append

- name: "Install Node.js 18.x via Chocolatey"
- name: "Verify pre-installed Node.js"
shell: pwsh
run: |
choco install nodejs-lts --version=18.20.4 -y
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
Write-Host "System Node.js installed at: $(where.exe node)"
node --version

- name: "Add Chocolatey Node.js to PATH"
shell: pwsh
run: |
$nodePath = "C:\Program Files\nodejs"
if (Test-Path $nodePath) {
$nodePath | Out-File -FilePath $env:GITHUB_PATH -Append
}
$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
Expand All @@ -65,17 +58,18 @@ jobs:
- name: "Verify migrated version"
shell: bash
run: |
./dist/dtvem.exe list node | grep -E "18\." || (echo "ERROR: Expected Node.js 18.x to be migrated" && exit 1)
echo "SUCCESS: Node.js 18.x was migrated from system"
# 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:** Chocolatey" >> $GITHUB_STEP_SUMMARY
echo "**Version:** 18.x" >> $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
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,21 @@ jobs:
name: Migrate Node.js from nvm (Ubuntu)
uses: ./.github/workflows/integration-test-migrate-node-ubuntu-nvm.yml

migrate-node-macos-system:
name: Migrate Node.js from System (macOS)
uses: ./.github/workflows/integration-test-migrate-node-macos-system.yml

migrate-node-windows-system:
name: Migrate Node.js from System (Windows)
uses: ./.github/workflows/integration-test-migrate-node-windows-system.yml

# --------------------------------------------------------------------------
# Remaining migration tests - re-enable incrementally
# --------------------------------------------------------------------------
# migrate-node-macos-system:
# name: Migrate Node.js from System (macOS)
# uses: ./.github/workflows/integration-test-migrate-node-macos-system.yml
#
# migrate-node-macos-fnm:
# name: Migrate Node.js from fnm (macOS)
# uses: ./.github/workflows/integration-test-migrate-node-macos-fnm.yml
#
# migrate-node-windows-system:
# name: Migrate Node.js from System (Windows)
# uses: ./.github/workflows/integration-test-migrate-node-windows-system.yml
#
# migrate-node-windows-nvm:
# name: Migrate Node.js from nvm-windows (Windows)
# uses: ./.github/workflows/integration-test-migrate-node-windows-nvm.yml
Expand Down