Skip to content

Commit 0bf0d66

Browse files
authored
Merge pull request #11 from Lombiq/issue/INFRA-92
INFRA-92: NuGet publish
2 parents ae9e4ce + 102ebe5 commit 0bf0d66

File tree

6 files changed

+48
-2
lines changed

6 files changed

+48
-2
lines changed

.github/workflows/publish.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: publish
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
call-publish-workflow:
10+
uses: Lombiq/GitHub-Actions/.github/workflows/publish.yml@dev
11+
secrets:
12+
API_KEY: ${{ secrets.DEFAULT_NUGET_PUBLISH_API_KEY }}

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
obj/
22
bin/
33
*.user
4+
artifacts/
5+
.vs/

Helpers/MockHelper.cs

+4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ public static ControllerContext CreateMockControllerContextWithUser() =>
1717
HttpContext = new DefaultHttpContext { User = new ClaimsPrincipal() },
1818
};
1919

20+
[Obsolete("Use the correctly named ConfigureMockAuthorizationService() instead.")]
2021
public static void ConfigureMockAutherizationService(this AutoMocker mocker, AuthorizationResult authorizationResult) =>
22+
ConfigureMockAuthorizationService(mocker, authorizationResult);
23+
24+
public static void ConfigureMockAuthorizationService(this AutoMocker mocker, AuthorizationResult authorizationResult) =>
2125
mocker
2226
.GetMock<IAuthorizationService>()
2327
.Setup(authorizationService => authorizationService.AuthorizeAsync(

Lombiq.Tests.csproj

+28-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,31 @@
22

33
<PropertyGroup>
44
<TargetFramework>netcoreapp3.1</TargetFramework>
5-
<IsPackable>false</IsPackable>
5+
<IsPackable>true</IsPackable>
66
<DefaultItemExcludes>$(DefaultItemExcludes);.git*</DefaultItemExcludes>
77
</PropertyGroup>
88

9+
<PropertyGroup>
10+
<Title>Lombiq Testing Toolbox for Orchard Core</Title>
11+
<Authors>Lombiq Technologies</Authors>
12+
<Copyright>Copyright © 2020, Lombiq Technologies Ltd.</Copyright>
13+
<Description>Lombiq Testing Toolbox for Orchard Core: General and unit testing extensions and helpers, mostly for ASP.NET Core and Orchard Core. See the project website for detailed documentation.</Description>
14+
<PackageTags>OrchardCore;Lombiq;AspNetCore;Moq;xUnit;UnitTesting;Testing</PackageTags>
15+
<PackageIcon>NuGetIcon.png</PackageIcon>
16+
<RepositoryUrl>https://github.com/Lombiq/Testing-Toolbox</RepositoryUrl>
17+
<PackageProjectUrl>https://github.com/Lombiq/Testing-Toolbox</PackageProjectUrl>
18+
<PackageLicenseFile>Licence.md</PackageLicenseFile>
19+
</PropertyGroup>
20+
21+
<ItemGroup>
22+
<None Include="Licence.md" Pack="true" PackagePath="" />
23+
<None Include="Readme.md" />
24+
<None Include="NuGetIcon.png" Pack="true" PackagePath="" />
25+
</ItemGroup>
26+
927
<ItemGroup>
1028
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="3.1.15" />
1129
<PackageReference Include="FluentAssertions" Version="5.10.3" />
12-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
1330
<PackageReference Include="Moq" Version="4.16.1" />
1431
<PackageReference Include="Shouldly" Version="4.0.3" />
1532
<PackageReference Include="xunit" Version="2.4.1" />
@@ -19,5 +36,14 @@
1936
</PackageReference>
2037
<PackageReference Include="Moq.AutoMock" Version="2.3.0" />
2138
</ItemGroup>
39+
40+
<!-- These are necessary for symbols NuGet packaging, otherwise Shouldly would prevent PDBs to be packaged, see:
41+
https://github.com/NuGet/Home/discussions/11541. -->
42+
<PropertyGroup Condition="'$(NuGetBuild)' == 'true'">
43+
<Optimize>true</Optimize>
44+
<DebugType>portable</DebugType>
45+
<Deterministic>true</Deterministic>
46+
<DeterministicSourcePaths>true</DeterministicSourcePaths>
47+
</PropertyGroup>
2248

2349
</Project>

NuGetIcon.png

4.55 KB
Loading

Readme.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Lombiq Testing Toolbox for Orchard Core
22

33

4+
[![Lombiq.Tests NuGet](https://img.shields.io/nuget/v/Lombiq.Tests?label=Lombiq.Tests)](https://www.nuget.org/packages/Lombiq.Tests/)
5+
46

57
## About
68

0 commit comments

Comments
 (0)