Update tests to use node16

This commit is contained in:
Ferenc Hammerl
2022-01-21 09:46:18 +00:00
committed by GitHub
parent 03265526d4
commit bbca7b9f1c
10 changed files with 15 additions and 15 deletions

View File

@@ -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);\"");

View File

@@ -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);

View File

@@ -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
{

View File

@@ -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);
}
}

View File

@@ -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'

View File

@@ -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()'

View File

@@ -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'

View File

@@ -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()'

View File

@@ -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'

View File

@@ -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'