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
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"image":"mcr.microsoft.com/devcontainers/universal:2"}
24 changes: 19 additions & 5 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,32 @@ jobs:
with:
dotnet-version: 9.0.x

- uses: browser-actions/setup-chrome@latest

- name: restore
run: dotnet restore

- name: build
run: dotnet build --configuration Release --no-restore

- name: test
run: dotnet test --configuration Release -f ${{ matrix.framework }} --no-restore
run: dotnet test ./tests/NuGetUtility.Test/NuGetUtility.Test.csproj --configuration Release -f ${{ matrix.framework }} --no-restore

test_url_to_license_mapping:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup dotnet 9.0.x
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- uses: browser-actions/setup-chrome@latest

- name: restore
run: dotnet restore

- name: test
run: dotnet test ./tests/NuGetUtility.Test.UrlToLicenseMapping/NuGetUtility.Test.UrlToLicenseMapping.csproj --configuration Release --no-restore

test_windows:
runs-on: windows-latest
strategy:
Expand Down Expand Up @@ -75,8 +91,6 @@ jobs:
- uses: nuget/setup-nuget@v2
- run: nuget restore NuGetUtility.sln

- uses: browser-actions/setup-chrome@latest

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ jobs:
- name: build
run: msbuild -t:rebuild -property:Configuration=Release

- uses: browser-actions/setup-chrome@latest

- name: test
uses: josepho0918/vstest-action@main
with:
Expand Down
21 changes: 21 additions & 0 deletions NuGetUtility.sln
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VersionRangesProject", "tes
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MultiTargetProjectWithDifferentDependencies", "tests\targets\MultiTargetProjectWithDifferentDependencies\MultiTargetProjectWithDifferentDependencies.csproj", "{A19BF89A-8B1F-4612-A923-08F52B53DC84}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NuGetUtility.Test.UrlToLicenseMapping", "tests\NuGetUtility.Test.UrlToLicenseMapping\NuGetUtility.Test.UrlToLicenseMapping.csproj", "{A77F9673-8296-4680-A713-8AC26B7DE41C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -305,6 +307,24 @@ Global
{A19BF89A-8B1F-4612-A923-08F52B53DC84}.TestWindows|x64.Build.0 = Debug|Any CPU
{A19BF89A-8B1F-4612-A923-08F52B53DC84}.TestWindows|x86.ActiveCfg = Debug|Any CPU
{A19BF89A-8B1F-4612-A923-08F52B53DC84}.TestWindows|x86.Build.0 = Debug|Any CPU
{A77F9673-8296-4680-A713-8AC26B7DE41C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A77F9673-8296-4680-A713-8AC26B7DE41C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A77F9673-8296-4680-A713-8AC26B7DE41C}.Debug|x64.ActiveCfg = Debug|Any CPU
{A77F9673-8296-4680-A713-8AC26B7DE41C}.Debug|x64.Build.0 = Debug|Any CPU
{A77F9673-8296-4680-A713-8AC26B7DE41C}.Debug|x86.ActiveCfg = Debug|Any CPU
{A77F9673-8296-4680-A713-8AC26B7DE41C}.Debug|x86.Build.0 = Debug|Any CPU
{A77F9673-8296-4680-A713-8AC26B7DE41C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A77F9673-8296-4680-A713-8AC26B7DE41C}.Release|Any CPU.Build.0 = Release|Any CPU
{A77F9673-8296-4680-A713-8AC26B7DE41C}.Release|x64.ActiveCfg = Release|Any CPU
{A77F9673-8296-4680-A713-8AC26B7DE41C}.Release|x64.Build.0 = Release|Any CPU
{A77F9673-8296-4680-A713-8AC26B7DE41C}.Release|x86.ActiveCfg = Release|Any CPU
{A77F9673-8296-4680-A713-8AC26B7DE41C}.Release|x86.Build.0 = Release|Any CPU
{A77F9673-8296-4680-A713-8AC26B7DE41C}.TestWindows|Any CPU.ActiveCfg = TestWindows|Any CPU
{A77F9673-8296-4680-A713-8AC26B7DE41C}.TestWindows|Any CPU.Build.0 = TestWindows|Any CPU
{A77F9673-8296-4680-A713-8AC26B7DE41C}.TestWindows|x64.ActiveCfg = TestWindows|Any CPU
{A77F9673-8296-4680-A713-8AC26B7DE41C}.TestWindows|x64.Build.0 = TestWindows|Any CPU
{A77F9673-8296-4680-A713-8AC26B7DE41C}.TestWindows|x86.ActiveCfg = TestWindows|Any CPU
{A77F9673-8296-4680-A713-8AC26B7DE41C}.TestWindows|x86.Build.0 = TestWindows|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -325,6 +345,7 @@ Global
{9B107A91-87F9-420C-ADF8-732C77DAFB93} = {FA92392F-D895-4D1E-A5ED-E6DC3C08223E}
{6C96D10E-6CB6-4387-922F-C7C97C037495} = {FA92392F-D895-4D1E-A5ED-E6DC3C08223E}
{A19BF89A-8B1F-4612-A923-08F52B53DC84} = {FA92392F-D895-4D1E-A5ED-E6DC3C08223E}
{A77F9673-8296-4680-A713-8AC26B7DE41C} = {C00E0699-ACCD-44CD-91A7-243A30504DB9}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {70887D40-0182-4C32-BFA1-B5A02E405F11}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>

<Configurations>Debug;Release;TestWindows</Configurations>

<Platforms>AnyCPU</Platforms>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AutoFixture" Version="5.0.0-preview0012" />
<PackageReference Include="AutoFixture.AutoNSubstitute" Version="5.0.0-preview0012" />
<PackageReference Include="AutoFixture.NUnit4" Version="5.0.0-preview0012" />
<PackageReference Include="Bogus" Version="35.6.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageReference Include="Mono.Cecil" Version="0.11.6" />
<PackageReference Include="NetArchTest.Rules" Version="1.3.2" />
<PackageReference Include="NSubstitute" Version="5.3.0" />
<PackageReference Include="NUnit" Version="4.3.2" />
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0" />
<PackageReference Include="coverlet.collector" Version="6.0.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Selenium.WebDriver" Version="4.31.0" />
<PackageReference Include="Verify.NUnit" Version="29.4.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\NuGetUtility\NuGetUtility.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ public class UrlToLicenseMappingTest
{
[Parallelizable(scope: ParallelScope.All)]
[TestCaseSource(typeof(UrlToLicenseMapping), nameof(UrlToLicenseMapping.Default))]
[Platform(Exclude = "Win")]
public async Task License_Should_Be_Available_And_Match_Expected_License(KeyValuePair<Uri, string> mappedValue)
{
int retryCount = 0;
Expand Down
2 changes: 0 additions & 2 deletions tests/NuGetUtility.Test/NuGetUtility.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Selenium.WebDriver" Version="4.31.0" />
<PackageReference Include="Verify.NUnit" Version="29.4.0" />
</ItemGroup>

Expand All @@ -46,5 +45,4 @@
<ItemGroup>
<ProjectReference Include="..\..\src\NuGetUtility\NuGetUtility.csproj" />
</ItemGroup>

</Project>
Loading