Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
- name: Install and Configure Keyring
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get update
sudo apt-get install -y gnome-keyring
export $(dbus-launch --sh-syntax)
export $(echo 'anypass_just_to_unlock' | gnome-keyring-daemon --unlock)
Expand All @@ -54,7 +55,7 @@ jobs:
name: test-results-${{ matrix.os }}
path: TestResults/*.trx
- name: Install ReportGenerator
run: dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.4.4
run: dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.4.11
- name: Merge code coverage files
run: reportgenerator "-reports:${{ github.workspace }}/**/*.cobertura.xml" "-targetdir:${{ github.workspace }}/report" "-reporttypes:Cobertura" "-filefilters:-*GenerationContext*.g.cs"
- name: Publish code coverage results
Expand Down
3 changes: 2 additions & 1 deletion .pipelines/templates/build-nuget.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ steps:
- bash: |
echo "##vso[task.setvariable variable=AgentOS;]${{ parameters.AgentOS }}"
- script: |
sudo apt-get update
sudo apt-get install -y gnome-keyring dbus-x11
eval "$(dbus-launch --sh-syntax)"
echo "##vso[task.setvariable variable=DBUS_SESSION_BUS_ADDRESS;]$DBUS_SESSION_BUS_ADDRESS"
Expand Down Expand Up @@ -66,7 +67,7 @@ steps:
inputs:
command: custom
custom: tool
arguments: 'install --global dotnet-reportgenerator-globaltool --version 5.4.4'
arguments: 'install --global dotnet-reportgenerator-globaltool --version 5.4.11'
- script: reportgenerator "-reports:$(Build.SourcesDirectory)/**/*.cobertura.xml" "-targetdir:$(Build.SourcesDirectory)/report" "-reporttypes:Cobertura" "-filefilters:-*GenerationContext*.g.cs"
displayName: Merge code coverage files
- task: PublishCodeCoverageResults@1
Expand Down
6 changes: 3 additions & 3 deletions MSStore.API/MSStore.API.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Identity.Client" Version="4.72.1" />
<PackageReference Include="Microsoft.Identity.Client.Extensions.Msal" Version="4.72.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.6" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.74.1" />
<PackageReference Include="Microsoft.Identity.Client.Extensions.Msal" Version="4.74.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.8" />
</ItemGroup>

</Project>
10 changes: 5 additions & 5 deletions MSStore.CLI.UnitTests/MSStore.CLI.UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="MSTest.Sdk/3.9.2">
<Project Sdk="MSTest.Sdk/3.10.1">

<PropertyGroup>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">net9.0;net9.0-windows10.0.17763.0</TargetFrameworks>
Expand Down Expand Up @@ -44,22 +44,22 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.Testing.Extensions.TrxReport" Version="1.7.2" />
<PackageReference Update="Microsoft.Testing.Extensions.TrxReport" Version="1.8.1" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="MSTest.Analyzers" Version="3.9.2">
<PackageReference Update="MSTest.Analyzers" Version="3.10.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<PackageReference Update="MSTest.TestAdapter" Version="3.9.2" />
<PackageReference Update="MSTest.TestAdapter" Version="3.10.1" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="MSTest.TestFramework" Version="3.9.2" />
<PackageReference Update="MSTest.TestFramework" Version="3.10.1" />
</ItemGroup>

</Project>
24 changes: 13 additions & 11 deletions MSStore.CLI.UnitTests/ProjectConfiguratorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ namespace MSStore.CLI.UnitTests
[TestClass]
public class ProjectConfiguratorTests : BaseCommandLineTest
{
public TestContext TestContext { get; set; }

[TestInitialize]
public void Init()
{
Expand Down Expand Up @@ -73,7 +75,7 @@ public async Task ProjectConfiguratorParsesFlutterProject()
result.Error.Should().Contain("This seems to be a Flutter project.");
result.Error.Should().Contain("is now configured to build to the Microsoft Store!");

var pubspecYamlFileContents = await File.ReadAllTextAsync(Path.Combine(path, "pubspec.yaml"));
var pubspecYamlFileContents = await File.ReadAllTextAsync(Path.Combine(path, "pubspec.yaml"), TestContext.CancellationTokenSource.Token);

pubspecYamlFileContents.Should().Contain("msix");
}
Expand Down Expand Up @@ -138,7 +140,7 @@ public async Task ProjectConfiguratorParsesAlreadyConfiguredFlutterProject()
result.Error.Should().Contain("This seems to be a Flutter project.");
result.Error.Should().Contain("is now configured to build to the Microsoft Store!");

var pubspecYamlFileContents = await File.ReadAllTextAsync(Path.Combine(path, "pubspec.yaml"));
var pubspecYamlFileContents = await File.ReadAllTextAsync(Path.Combine(path, "pubspec.yaml"), TestContext.CancellationTokenSource.Token);

pubspecYamlFileContents.Should().Contain("msix");
}
Expand Down Expand Up @@ -194,7 +196,7 @@ public async Task ProjectConfiguratorParsesElectronNpmProject()
result.Error.Should().Contain("This seems to be a Electron project.");
result.Error.Should().Contain("is now configured to build to the Microsoft Store!");

var packageJsonFileContents = await File.ReadAllTextAsync(Path.Combine(path, "package.json"));
var packageJsonFileContents = await File.ReadAllTextAsync(Path.Combine(path, "package.json"), TestContext.CancellationTokenSource.Token);

packageJsonFileContents.Should().Contain("appx");
}
Expand Down Expand Up @@ -237,7 +239,7 @@ public async Task ProjectConfiguratorParsesAlreadyConfiguredElectronNpmProject()
result.Error.Should().Contain("This seems to be a Electron project.");
result.Error.Should().Contain("is now configured to build to the Microsoft Store!");

var packageJsonFileContents = await File.ReadAllTextAsync(Path.Combine(path, "package.json"));
var packageJsonFileContents = await File.ReadAllTextAsync(Path.Combine(path, "package.json"), TestContext.CancellationTokenSource.Token);

packageJsonFileContents.Should().Contain("appx");
}
Expand Down Expand Up @@ -293,7 +295,7 @@ public async Task ProjectConfiguratorParsesElectronYarnProject()
result.Error.Should().Contain("This seems to be a Electron project.");
result.Error.Should().Contain("is now configured to build to the Microsoft Store!");

var packageJsonFileContents = await File.ReadAllTextAsync(Path.Combine(path, "package.json"));
var packageJsonFileContents = await File.ReadAllTextAsync(Path.Combine(path, "package.json"), TestContext.CancellationTokenSource.Token);

packageJsonFileContents.Should().Contain("appx");
}
Expand Down Expand Up @@ -336,7 +338,7 @@ public async Task ProjectConfiguratorParsesAlreadyConfiguredElectronYarnProject(
result.Error.Should().Contain("This seems to be a Electron project.");
result.Error.Should().Contain("is now configured to build to the Microsoft Store!");

var packageJsonFileContents = await File.ReadAllTextAsync(Path.Combine(path, "package.json"));
var packageJsonFileContents = await File.ReadAllTextAsync(Path.Combine(path, "package.json"), TestContext.CancellationTokenSource.Token);

packageJsonFileContents.Should().Contain("appx");
}
Expand Down Expand Up @@ -458,7 +460,7 @@ private async Task ValidateReactNativeAppxManifestWasUpdatedAsync(string path)
var dir = new DirectoryInfo(Path.Combine(path, "windows"));
dir.GetDirectories().Should().HaveCount(1);
var projectDir = dir.GetDirectories()[0];
var appxManifestFileContents = await File.ReadAllTextAsync(Path.Combine(projectDir.FullName, "Package.appxmanifest"));
var appxManifestFileContents = await File.ReadAllTextAsync(Path.Combine(projectDir.FullName, "Package.appxmanifest"), TestContext.CancellationTokenSource.Token);

appxManifestFileContents.Should().Contain(FakeApps[0].Id);
appxManifestFileContents.Should().Contain(FakeApps[0].PrimaryName);
Expand All @@ -483,7 +485,7 @@ public async Task ProjectConfiguratorParsesUWPProject()

result.Error.Should().Contain("This seems to be a UWP project.");

var appxManifestFileContents = await File.ReadAllTextAsync(Path.Combine(path, "Package.appxmanifest"));
var appxManifestFileContents = await File.ReadAllTextAsync(Path.Combine(path, "Package.appxmanifest"), TestContext.CancellationTokenSource.Token);

appxManifestFileContents.Should().Contain("Fake App");
}
Expand Down Expand Up @@ -511,7 +513,7 @@ public async Task ProjectConfiguratorParsesWinUIProject()

result.Error.Should().Contain("This seems to be a Windows App SDK/WinUI project.");

var appxManifestFileContents = await File.ReadAllTextAsync(Path.Combine(path, "Package.appxmanifest"));
var appxManifestFileContents = await File.ReadAllTextAsync(Path.Combine(path, "Package.appxmanifest"), TestContext.CancellationTokenSource.Token);

appxManifestFileContents.Should().Contain("Fake App");
}
Expand Down Expand Up @@ -539,11 +541,11 @@ public async Task ProjectConfiguratorParsesMauiProject()

result.Error.Should().Contain("This seems to be a Maui project.");

var appxManifestFileContents = await File.ReadAllTextAsync(Path.Combine(path, "Platforms", "Windows", "Package.appxmanifest"));
var appxManifestFileContents = await File.ReadAllTextAsync(Path.Combine(path, "Platforms", "Windows", "Package.appxmanifest"), TestContext.CancellationTokenSource.Token);

appxManifestFileContents.Should().Contain("9PN3ABCDEFGA");

var csprojFileContents = await File.ReadAllTextAsync(Path.Combine(path, "MauiApp.csproj"));
var csprojFileContents = await File.ReadAllTextAsync(Path.Combine(path, "MauiApp.csproj"), TestContext.CancellationTokenSource.Token);

csprojFileContents.Should().Contain("Fake App");
}
Expand Down
18 changes: 10 additions & 8 deletions MSStore.CLI.UnitTests/PublishCommandUnitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ namespace MSStore.CLI.UnitTests
[TestClass]
public class PublishCommandUnitTests : BaseCommandLineTest
{
public TestContext TestContext { get; set; }

[TestInitialize]
public void Init()
{
Expand Down Expand Up @@ -37,7 +39,7 @@ public async Task PublishCommandForUWPAppsShouldCallMSBuildIfWindows()

AppXManifestManager.Object.UpdateManifest(Path.Combine(path, "Package.appxmanifest"), FakeApps[0], "publisher", null);
var appPackagesFolder = Directory.CreateDirectory(Path.Combine(path, "AppPackages"));
await File.WriteAllTextAsync(Path.Combine(appPackagesFolder.FullName, "test.msixupload"), string.Empty);
await File.WriteAllTextAsync(Path.Combine(appPackagesFolder.FullName, "test.msixupload"), string.Empty, TestContext.CancellationTokenSource.Token);

AddDefaultFakeSuccessfulSubmission();

Expand Down Expand Up @@ -66,8 +68,8 @@ public async Task PublishCommandForWinUIAppsShouldCallMSBuildIfWindows()
var appPackagesFolderX64 = Directory.CreateDirectory(Path.Combine(path, "AppPackages", "x64"));
var appPackagesFolderArm64 = Directory.CreateDirectory(Path.Combine(path, "AppPackages", "arm64"));

await File.WriteAllTextAsync(Path.Combine(appPackagesFolderX64.FullName, "test_x64.msix"), string.Empty);
await File.WriteAllTextAsync(Path.Combine(appPackagesFolderArm64.FullName, "test_arm64.msix"), string.Empty);
await File.WriteAllTextAsync(Path.Combine(appPackagesFolderX64.FullName, "test_x64.msix"), string.Empty, TestContext.CancellationTokenSource.Token);
await File.WriteAllTextAsync(Path.Combine(appPackagesFolderArm64.FullName, "test_arm64.msix"), string.Empty, TestContext.CancellationTokenSource.Token);

AddDefaultFakeSuccessfulSubmission();

Expand Down Expand Up @@ -99,8 +101,8 @@ public async Task PublishCommandForMauiAppsShouldCallMSBuildIfWindows()
var appPackagesFolderX64 = Directory.CreateDirectory(Path.Combine(path, "AppPackages", "x64"));
var appPackagesFolderArm64 = Directory.CreateDirectory(Path.Combine(path, "AppPackages", "arm64"));

await File.WriteAllTextAsync(Path.Combine(appPackagesFolderX64.FullName, "test_x64.msix"), string.Empty);
await File.WriteAllTextAsync(Path.Combine(appPackagesFolderArm64.FullName, "test_arm64.msix"), string.Empty);
await File.WriteAllTextAsync(Path.Combine(appPackagesFolderX64.FullName, "test_x64.msix"), string.Empty, TestContext.CancellationTokenSource.Token);
await File.WriteAllTextAsync(Path.Combine(appPackagesFolderArm64.FullName, "test_arm64.msix"), string.Empty, TestContext.CancellationTokenSource.Token);

AddDefaultFakeSuccessfulSubmission();

Expand Down Expand Up @@ -132,7 +134,7 @@ await FlutterProjectConfigurator.UpdateManifestAsync(
null,
CancellationToken.None);
var appPackagesFolder = Directory.CreateDirectory(Path.Combine(path, "build", "windows", "x64", "runner", "Release"));
await File.WriteAllTextAsync(Path.Combine(appPackagesFolder.FullName, "test.msix"), string.Empty);
await File.WriteAllTextAsync(Path.Combine(appPackagesFolder.FullName, "test.msix"), string.Empty, TestContext.CancellationTokenSource.Token);

AddDefaultFakeSuccessfulSubmission();

Expand Down Expand Up @@ -162,7 +164,7 @@ await ElectronProjectConfigurator.UpdateManifestAsync(
ElectronManifestManager.Object,
CancellationToken.None);
var appPackagesFolder = Directory.CreateDirectory(Path.Combine(path, "dist"));
await File.WriteAllTextAsync(Path.Combine(appPackagesFolder.FullName, "test.appx"), string.Empty);
await File.WriteAllTextAsync(Path.Combine(appPackagesFolder.FullName, "test.appx"), string.Empty, TestContext.CancellationTokenSource.Token);

AddDefaultFakeSuccessfulSubmission();

Expand Down Expand Up @@ -200,7 +202,7 @@ public async Task PublishCommandForReactNativeAppsShouldUploadAppxUpload(string
AppXManifestManager.Object.UpdateManifest(appxManifest.FullName, FakeApps[0], "publisher", null);

var appPackagesFolder = Directory.CreateDirectory(Path.Combine(appxManifest.Directory!.FullName, "AppPackages"));
await File.WriteAllTextAsync(Path.Combine(appPackagesFolder.FullName, "test.appxupload"), string.Empty);
await File.WriteAllTextAsync(Path.Combine(appPackagesFolder.FullName, "test.appxupload"), string.Empty, TestContext.CancellationTokenSource.Token);

AddDefaultFakeSuccessfulSubmission();

Expand Down
4 changes: 3 additions & 1 deletion MSStore.CLI.UnitTests/TelemetryUnitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ namespace MSStore.CLI.UnitTests
[TestClass]
public class TelemetryUnitTests : BaseCommandLineTest
{
public TestContext TestContext { get; set; }

[TestMethod]
public async Task TelemetryConfigurationLoadsAsync()
{
var telemetryConnectionStringProvider = await TelemetryConnectionStringProvider.LoadAsync(default);
var telemetryConnectionStringProvider = await TelemetryConnectionStringProvider.LoadAsync(default, TestContext.CancellationTokenSource.Token);

telemetryConnectionStringProvider.Should().NotBeNull();

Expand Down
16 changes: 8 additions & 8 deletions MSStore.CLI/MSStore.CLI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Azure.Storage.Blobs" Version="12.24.0" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.25.0" />
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.23.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.6" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="9.0.6" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="9.0.6" />
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.6" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.72.1" />
<PackageReference Include="Microsoft.Identity.Client.Broker" Version="4.72.1" />
<PackageReference Include="Microsoft.Identity.Client.Extensions.Msal" Version="4.72.1" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.8" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="9.0.8" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="9.0.8" />
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.8" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.74.1" />
<PackageReference Include="Microsoft.Identity.Client.Broker" Version="4.74.1" />
<PackageReference Include="Microsoft.Identity.Client.Extensions.Msal" Version="4.74.1" />
<PackageReference Include="SkiaSharp" Version="3.119.0" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageReference Include="System.CommandLine.Hosting" Version="0.4.0-alpha.22272.1" />
Expand Down
Loading