mirror of
https://github.com/actions/runner.git
synced 2025-12-13 19:03:44 +00:00
Update tests to use node16
This commit is contained in:
@@ -27,9 +27,9 @@ namespace GitHub.Runner.Common.Tests
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
#if OS_WINDOWS
|
#if OS_WINDOWS
|
||||||
string node = Path.Combine(TestUtil.GetSrcPath(), @"..\_layout\externals\node12\bin\node");
|
string node = Path.Combine(TestUtil.GetSrcPath(), @"..\_layout\externals\node16\bin\node");
|
||||||
#else
|
#else
|
||||||
string node = Path.Combine(TestUtil.GetSrcPath(), @"../_layout/externals/node12/bin/node");
|
string node = Path.Combine(TestUtil.GetSrcPath(), @"../_layout/externals/node16/bin/node");
|
||||||
hc.EnqueueInstance<IProcessInvoker>(new ProcessInvokerWrapper());
|
hc.EnqueueInstance<IProcessInvoker>(new ProcessInvokerWrapper());
|
||||||
#endif
|
#endif
|
||||||
var startInfo = new ProcessStartInfo(node, "-e \"setTimeout(function(){{}}, 15 * 1000);\"");
|
var startInfo = new ProcessStartInfo(node, "-e \"setTimeout(function(){{}}, 15 * 1000);\"");
|
||||||
|
|||||||
@@ -1451,7 +1451,7 @@ outputs:
|
|||||||
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
||||||
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: 'node16'
|
||||||
main: 'task.js'
|
main: 'task.js'
|
||||||
";
|
";
|
||||||
Pipelines.ActionStep instance;
|
Pipelines.ActionStep instance;
|
||||||
@@ -1730,7 +1730,7 @@ outputs:
|
|||||||
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
||||||
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: 'node16'
|
||||||
main: 'task.js'
|
main: 'task.js'
|
||||||
";
|
";
|
||||||
Pipelines.ActionStep instance;
|
Pipelines.ActionStep instance;
|
||||||
@@ -1798,7 +1798,7 @@ outputs:
|
|||||||
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
||||||
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: 'node16'
|
||||||
main: 'task.js'
|
main: 'task.js'
|
||||||
post: 'cleanup.js'
|
post: 'cleanup.js'
|
||||||
";
|
";
|
||||||
@@ -2064,7 +2064,7 @@ author: 'GitHub'
|
|||||||
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
||||||
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: 'node16'
|
||||||
main: 'task.js'
|
main: 'task.js'
|
||||||
";
|
";
|
||||||
CreateAction(yamlContent: Content, instance: out _, directory: out string directory);
|
CreateAction(yamlContent: Content, instance: out _, directory: out string directory);
|
||||||
|
|||||||
@@ -408,7 +408,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
|||||||
var nodeAction = result.Execution as NodeJSActionExecutionData;
|
var nodeAction = result.Execution as NodeJSActionExecutionData;
|
||||||
|
|
||||||
Assert.Equal("main.js", nodeAction.Script);
|
Assert.Equal("main.js", nodeAction.Script);
|
||||||
Assert.Equal("node12", nodeAction.NodeVersion);
|
Assert.Equal("node16", nodeAction.NodeVersion);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ namespace GitHub.Runner.Common.Tests.Worker
|
|||||||
.ReturnsAsync(0);
|
.ReturnsAsync(0);
|
||||||
|
|
||||||
// Act.
|
// Act.
|
||||||
var nodeVersion = await sh.DetermineNodeRuntimeVersion(_ec.Object, "node12");
|
var nodeVersion = await sh.DetermineNodeRuntimeVersion(_ec.Object, "node16");
|
||||||
|
|
||||||
// Assert.
|
// Assert.
|
||||||
Assert.Equal("node12", nodeVersion);
|
Assert.Equal("node16", nodeVersion);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,5 +16,5 @@ outputs:
|
|||||||
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
||||||
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: 'node16'
|
||||||
main: 'main.js'
|
main: 'main.js'
|
||||||
@@ -16,7 +16,7 @@ outputs:
|
|||||||
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
||||||
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: 'node16'
|
||||||
main: 'main.js'
|
main: 'main.js'
|
||||||
post: 'cleanup.js'
|
post: 'cleanup.js'
|
||||||
post-if: 'cancelled()'
|
post-if: 'cancelled()'
|
||||||
@@ -16,6 +16,6 @@ outputs:
|
|||||||
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
||||||
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: 'node16'
|
||||||
main: 'main.js'
|
main: 'main.js'
|
||||||
post: 'cleanup.js'
|
post: 'cleanup.js'
|
||||||
@@ -16,7 +16,7 @@ outputs:
|
|||||||
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
||||||
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: 'node16'
|
||||||
main: 'main.js'
|
main: 'main.js'
|
||||||
pre: 'init.js'
|
pre: 'init.js'
|
||||||
pre-if: 'cancelled()'
|
pre-if: 'cancelled()'
|
||||||
@@ -16,6 +16,6 @@ outputs:
|
|||||||
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
||||||
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: 'node16'
|
||||||
main: 'main.js'
|
main: 'main.js'
|
||||||
pre: 'init.js'
|
pre: 'init.js'
|
||||||
@@ -15,5 +15,5 @@ outputs:
|
|||||||
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
||||||
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: 'node16'
|
||||||
main: 'scripts/main.js'
|
main: 'scripts/main.js'
|
||||||
Reference in New Issue
Block a user