Skip to content

Commit aa864c7

Browse files
committed
Filtering out samples in tests
1 parent 7b5e13b commit aa864c7

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ jobs:
3636
run: dotnet build --configuration Release --no-restore
3737

3838
- name: Test
39-
run: dotnet test --no-restore
39+
run: dotnet test --no-restore --filter Category!=Samples

samples/NMatcher.Samples.Api.Tests/Integration/WeatherForecastControllerTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
namespace NMatcher.Samples.Api.Tests.Integration;
55

6+
7+
[Trait("Category", "Sample")]
68
public class WeatherForecastControllerTests
79
{
810
[Fact]

samples/NMatcher.Samples.Api.Tests/NMatcher.Samples.Api.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.5" />
13+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.16" />
1414
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
1515
<PackageReference Include="NMatcher.FluentAssertions" Version="2.2.2" />
1616
<PackageReference Include="xunit" Version="2.4.2" />

samples/NMatcher.Samples.Api/NMatcher.Samples.Api.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFrameworks>net6.0;</TargetFrameworks>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
7+
<LangVersion>11</LangVersion>
78
</PropertyGroup>
89

910
<ItemGroup>
10-
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.4"/>
11-
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0"/>
11+
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
1212
</ItemGroup>
1313

1414
<ItemGroup>

0 commit comments

Comments
 (0)