mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Do not skip AZ signing test in CI
This commit is contained in:
@@ -3,6 +3,8 @@ using Velopack;
|
|||||||
|
|
||||||
public static class PathHelper
|
public static class PathHelper
|
||||||
{
|
{
|
||||||
|
public static bool IsCI => Environment.GetEnvironmentVariable("CI") != null;
|
||||||
|
|
||||||
public static string GetFixturesDir()
|
public static string GetFixturesDir()
|
||||||
=> Path.Combine(GetTestRoot(), "fixtures");
|
=> Path.Combine(GetTestRoot(), "fixtures");
|
||||||
|
|
||||||
|
|||||||
@@ -40,15 +40,14 @@ public class TrustedSigningTests
|
|||||||
public async void CanSignWithTrustedSigning()
|
public async void CanSignWithTrustedSigning()
|
||||||
{
|
{
|
||||||
Skip.IfNot(VelopackRuntimeInfo.IsWindows, "Only supported on Windows");
|
Skip.IfNot(VelopackRuntimeInfo.IsWindows, "Only supported on Windows");
|
||||||
|
|
||||||
|
if (!PathHelper.IsCI) {
|
||||||
Skip.IfNot(await IsAuthenticatedForCodeSigningAsync(), "Sign in with az login first");
|
Skip.IfNot(await IsAuthenticatedForCodeSigningAsync(), "Sign in with az login first");
|
||||||
|
}
|
||||||
|
|
||||||
using var logger = _output.BuildLoggerFor<TrustedSigningTests>();
|
using var logger = _output.BuildLoggerFor<TrustedSigningTests>();
|
||||||
using var _ = TempUtil.GetTempDirectory(out var releaseDir);
|
using var _ = TempUtil.GetTempDirectory(out var releaseDir);
|
||||||
|
|
||||||
string channel = string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("CI"))
|
|
||||||
? VelopackRuntimeInfo.SystemOs.GetOsShortName()
|
|
||||||
: "ci-" + VelopackRuntimeInfo.SystemOs.GetOsShortName();
|
|
||||||
|
|
||||||
string metadataFile = Path.Combine(releaseDir, "metadata.json");
|
string metadataFile = Path.Combine(releaseDir, "metadata.json");
|
||||||
File.WriteAllText(
|
File.WriteAllText(
|
||||||
metadataFile,
|
metadataFile,
|
||||||
@@ -67,7 +66,6 @@ public class TrustedSigningTests
|
|||||||
$"aztrusted-{DateTime.UtcNow.ToLongDateString()}",
|
$"aztrusted-{DateTime.UtcNow.ToLongDateString()}",
|
||||||
releaseDir,
|
releaseDir,
|
||||||
logger,
|
logger,
|
||||||
channel: channel,
|
|
||||||
azureTrustedSignFile: metadataFile);
|
azureTrustedSignFile: metadataFile);
|
||||||
|
|
||||||
var files = Directory.EnumerateFiles(releaseDir)
|
var files = Directory.EnumerateFiles(releaseDir)
|
||||||
|
|||||||
Reference in New Issue
Block a user