mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
[Windows] Rework NodeJS install (#4375)
This commit is contained in:
@@ -10,7 +10,8 @@ $CachePath = 'C:\npm\cache'
|
||||
New-Item -Path $PrefixPath -Force -ItemType Directory
|
||||
New-Item -Path $CachePath -Force -ItemType Directory
|
||||
|
||||
Choco-Install -PackageName nodejs-lts -ArgumentList "--force"
|
||||
$defaultVersion = (Get-ToolsetContent).node.default
|
||||
Choco-Install -PackageName nodejs -ArgumentList "--version=$defaultVersion"
|
||||
|
||||
Add-MachinePathItem $PrefixPath
|
||||
$env:Path = Get-MachinePath
|
||||
|
||||
@@ -16,4 +16,10 @@ Describe "Node.JS" {
|
||||
$Test | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Context "Node.js version" {
|
||||
It "Node.js version should correspond to the version in the toolset" {
|
||||
node --version | Should -BeLike "v$((Get-ToolsetContent).node.default)*"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -421,5 +421,8 @@
|
||||
"args": [ "--installargs", "ADD_CMAKE_TO_PATH=\"System\"" ]
|
||||
}
|
||||
]
|
||||
},
|
||||
"node": {
|
||||
"default": "14.18.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -452,5 +452,8 @@
|
||||
"args": [ "--installargs", "ADD_CMAKE_TO_PATH=\"System\"" ]
|
||||
}
|
||||
]
|
||||
},
|
||||
"node": {
|
||||
"default": "14.18.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -289,5 +289,8 @@
|
||||
"args": [ "--installargs", "ADD_CMAKE_TO_PATH=\"System\"" ]
|
||||
}
|
||||
]
|
||||
},
|
||||
"node": {
|
||||
"default": "14.18.1"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user