mirror of
https://github.com/actions/runner.git
synced 2025-12-11 12:57:05 +00:00
Update tests to use node16
This commit is contained in:
@@ -27,9 +27,9 @@ namespace GitHub.Runner.Common.Tests
|
||||
try
|
||||
{
|
||||
#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
|
||||
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());
|
||||
#endif
|
||||
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
|
||||
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
||||
runs:
|
||||
using: 'node12'
|
||||
using: 'node16'
|
||||
main: 'task.js'
|
||||
";
|
||||
Pipelines.ActionStep instance;
|
||||
@@ -1730,7 +1730,7 @@ outputs:
|
||||
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
||||
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
||||
runs:
|
||||
using: 'node12'
|
||||
using: 'node16'
|
||||
main: 'task.js'
|
||||
";
|
||||
Pipelines.ActionStep instance;
|
||||
@@ -1798,7 +1798,7 @@ outputs:
|
||||
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
||||
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
||||
runs:
|
||||
using: 'node12'
|
||||
using: 'node16'
|
||||
main: 'task.js'
|
||||
post: 'cleanup.js'
|
||||
";
|
||||
@@ -2064,7 +2064,7 @@ author: 'GitHub'
|
||||
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
||||
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
||||
runs:
|
||||
using: 'node12'
|
||||
using: 'node16'
|
||||
main: 'task.js'
|
||||
";
|
||||
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;
|
||||
|
||||
Assert.Equal("main.js", nodeAction.Script);
|
||||
Assert.Equal("node12", nodeAction.NodeVersion);
|
||||
Assert.Equal("node16", nodeAction.NodeVersion);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
@@ -45,10 +45,10 @@ namespace GitHub.Runner.Common.Tests.Worker
|
||||
.ReturnsAsync(0);
|
||||
|
||||
// Act.
|
||||
var nodeVersion = await sh.DetermineNodeRuntimeVersion(_ec.Object, "node12");
|
||||
var nodeVersion = await sh.DetermineNodeRuntimeVersion(_ec.Object, "node16");
|
||||
|
||||
// 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
|
||||
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
||||
runs:
|
||||
using: 'node12'
|
||||
using: 'node16'
|
||||
main: 'main.js'
|
||||
@@ -16,7 +16,7 @@ outputs:
|
||||
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
||||
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
||||
runs:
|
||||
using: 'node12'
|
||||
using: 'node16'
|
||||
main: 'main.js'
|
||||
post: 'cleanup.js'
|
||||
post-if: 'cancelled()'
|
||||
@@ -16,6 +16,6 @@ outputs:
|
||||
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
||||
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
||||
runs:
|
||||
using: 'node12'
|
||||
using: 'node16'
|
||||
main: 'main.js'
|
||||
post: 'cleanup.js'
|
||||
@@ -16,7 +16,7 @@ outputs:
|
||||
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
||||
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
||||
runs:
|
||||
using: 'node12'
|
||||
using: 'node16'
|
||||
main: 'main.js'
|
||||
pre: 'init.js'
|
||||
pre-if: 'cancelled()'
|
||||
@@ -16,6 +16,6 @@ outputs:
|
||||
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
||||
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
||||
runs:
|
||||
using: 'node12'
|
||||
using: 'node16'
|
||||
main: 'main.js'
|
||||
pre: 'init.js'
|
||||
@@ -15,5 +15,5 @@ outputs:
|
||||
icon: 'hello.svg' # vector art to display in the GitHub Marketplace
|
||||
color: 'green' # optional, decorates the entry in the GitHub Marketplace
|
||||
runs:
|
||||
using: 'node12'
|
||||
using: 'node16'
|
||||
main: 'scripts/main.js'
|
||||
Reference in New Issue
Block a user