mirror of
https://github.com/actions/runner-images.git
synced 2025-12-18 15:57:17 +00:00
[ubuntu] Add lerna (#2763)
* Add lerna to linux images * Add a comment about netlify-cli * remove Node.js tests from Tools.Tests.ps1 * fix tabs * revert empty lines * fix code style
This commit is contained in:
@@ -4,14 +4,28 @@
|
|||||||
## Desc: Installs Node.js LTS and related tooling (Gulp, Grunt)
|
## Desc: Installs Node.js LTS and related tooling (Gulp, Grunt)
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
|
# Source the helpers for use with the script
|
||||||
|
source $HELPER_SCRIPTS/install.sh
|
||||||
|
|
||||||
# Install LTS Node.js and related build tools
|
# Install LTS Node.js and related build tools
|
||||||
curl -sL https://raw.githubusercontent.com/mklement0/n-install/stable/bin/n-install | bash -s -- -ny -
|
curl -sL https://raw.githubusercontent.com/mklement0/n-install/stable/bin/n-install | bash -s -- -ny -
|
||||||
~/n/bin/n lts
|
~/n/bin/n lts
|
||||||
npm install -g grunt gulp n parcel-bundler typescript newman vercel
|
# Install node modules
|
||||||
npm install -g --save-dev webpack webpack-cli
|
node_modules=$(get_toolset_value '.node_modules[].name')
|
||||||
|
|
||||||
# Install the Netlify CLI using --unsafe-perm=true options to avoid permission issues
|
# remove commenting out of this line as nmp migrated to v7
|
||||||
npm install -g --unsafe-perm=true netlify-cli
|
# npm install -g $node_modules
|
||||||
|
|
||||||
|
# TODO: workaround for Netlify CLI with npm6. Remove 19-28 and uncomment 17 if migration to npm7 compelted
|
||||||
|
for module in $node_modules; do
|
||||||
|
echo "Installing node module $module"
|
||||||
|
if [ $module = "netlify-cli" ];then
|
||||||
|
# Install the Netlify CLI using --unsafe-perm=true options to avoid permission issues
|
||||||
|
npm install -g --unsafe-perm=true $module
|
||||||
|
else
|
||||||
|
npm install -g $module
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
echo "Creating the symlink for [now] command to vercel CLI"
|
echo "Creating the symlink for [now] command to vercel CLI"
|
||||||
ln -s /usr/local/bin/vercel /usr/local/bin/now
|
ln -s /usr/local/bin/vercel /usr/local/bin/now
|
||||||
@@ -26,4 +40,4 @@ apt-get update
|
|||||||
# Install yarn
|
# Install yarn
|
||||||
apt-get install -y --no-install-recommends yarn
|
apt-get install -y --no-install-recommends yarn
|
||||||
|
|
||||||
invoke_tests "Tools" "Node.js"
|
invoke_tests "Node" "Node.js"
|
||||||
|
|||||||
14
images/linux/scripts/tests/Node.Tests.ps1
Normal file
14
images/linux/scripts/tests/Node.Tests.ps1
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
Describe "Node.js" {
|
||||||
|
$binaries = @("node")
|
||||||
|
$module_commands = (Get-ToolsetContent).node_modules | ForEach-Object { $_.command }
|
||||||
|
$testCases = $binaries + $module_commands | ForEach-Object { @{NodeCommand = $_} }
|
||||||
|
|
||||||
|
It "<NodeCommand>" -TestCases $testCases {
|
||||||
|
param (
|
||||||
|
[string] $NodeCommand
|
||||||
|
)
|
||||||
|
|
||||||
|
"$NodeCommand --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -313,18 +313,6 @@ Describe "Containers" -Skip:(Test-IsUbuntu16) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Describe "Node.js" {
|
|
||||||
$testCases = @("node", "grunt", "gulp", "webpack", "parcel", "yarn", "newman", "netlify", "vercel", "now") | ForEach-Object { @{NodeCommand = $_} }
|
|
||||||
|
|
||||||
It "<NodeCommand>" -TestCases $testCases {
|
|
||||||
param (
|
|
||||||
[string] $NodeCommand
|
|
||||||
)
|
|
||||||
|
|
||||||
"$NodeCommand --version" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Describe "nvm" {
|
Describe "nvm" {
|
||||||
It "nvm" {
|
It "nvm" {
|
||||||
"source /etc/skel/.nvm/nvm.sh && nvm --version" | Should -ReturnZeroExitCode
|
"source /etc/skel/.nvm/nvm.sh && nvm --version" | Should -ReturnZeroExitCode
|
||||||
|
|||||||
@@ -277,5 +277,47 @@
|
|||||||
"8.0"
|
"8.0"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"rubygems": []
|
"rubygems": [],
|
||||||
|
"node_modules": [
|
||||||
|
{
|
||||||
|
"name": "grunt",
|
||||||
|
"command": "grunt"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "gulp",
|
||||||
|
"command": "gulp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "n",
|
||||||
|
"command": "n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "parcel-bundler",
|
||||||
|
"command": "parcel"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "typescript",
|
||||||
|
"command": "tsc"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "newman",
|
||||||
|
"command": "newman"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "vercel",
|
||||||
|
"command": "vercel"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "webpack",
|
||||||
|
"command": "webpack"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "webpack-cli",
|
||||||
|
"command": "webpack-cli"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "netlify-cli",
|
||||||
|
"command": "netlify"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -280,5 +280,47 @@
|
|||||||
"8.0"
|
"8.0"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"rubygems": []
|
"rubygems": [],
|
||||||
|
"node_modules": [
|
||||||
|
{
|
||||||
|
"name": "grunt",
|
||||||
|
"command": "grunt"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "gulp",
|
||||||
|
"command": "gulp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "n",
|
||||||
|
"command": "n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "parcel-bundler",
|
||||||
|
"command": "parcel"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "typescript",
|
||||||
|
"command": "tsc"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "newman",
|
||||||
|
"command": "newman"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "vercel",
|
||||||
|
"command": "vercel"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "webpack",
|
||||||
|
"command": "webpack"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "webpack-cli",
|
||||||
|
"command": "webpack-cli"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "netlify-cli",
|
||||||
|
"command": "netlify"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -259,5 +259,51 @@
|
|||||||
},
|
},
|
||||||
"rubygems": [
|
"rubygems": [
|
||||||
{"name": "fastlane"}
|
{"name": "fastlane"}
|
||||||
|
],
|
||||||
|
"node_modules": [
|
||||||
|
{
|
||||||
|
"name": "grunt",
|
||||||
|
"command": "grunt"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "gulp",
|
||||||
|
"command": "gulp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "n",
|
||||||
|
"command": "n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "parcel-bundler",
|
||||||
|
"command": "parcel"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "typescript",
|
||||||
|
"command": "tsc"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "newman",
|
||||||
|
"command": "newman"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "vercel",
|
||||||
|
"command": "vercel"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "webpack",
|
||||||
|
"command": "webpack"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "webpack-cli",
|
||||||
|
"command": "webpack-cli"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "netlify-cli",
|
||||||
|
"command": "netlify"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "lerna",
|
||||||
|
"command": "lerna"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user