Skip to content

Commit 068c9c7

Browse files
committed
(build) disable netcoreapp3.1 test of some msbuild tests for now
1 parent ef9c944 commit 068c9c7

File tree

8 files changed

+21
-2
lines changed

8 files changed

+21
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ jobs:
159159
dotnet-version: '6.0.x'
160160
include-prerelease: true
161161
-
162-
name: '[Build]'
162+
name: '[Unit Test]'
163163
shell: pwsh
164164
run: dotnet run/build.dll --target=Test --dotnet_target=${{ matrix.targetFramework }}
165165

build/build/Tasks/Test/UnitTest.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,14 @@ private static void TestProjectForTarget(BuildContext context, FilePath project,
8787
Exclude = new List<string> { "[GitVersion*.Tests]*", "[GitTools.Testing]*" }
8888
};
8989

90+
if (string.Equals(framework, Constants.CoreFxVersion31))
91+
{
92+
settings.Filter = $"TestCategory!={Constants.NoNetCoreApp31}";
93+
}
94+
9095
if (string.Equals(framework, Constants.FullFxVersion48))
9196
{
92-
settings.Filter = context.IsRunningOnUnix() ? "TestCategory!=NoMono" : "TestCategory!=NoNet48";
97+
settings.Filter = context.IsRunningOnUnix() ? $"TestCategory!={Constants.NoMono}" : $"TestCategory!={Constants.NoNet48}";
9398
}
9499

95100
context.DotNetCoreTest(project.FullPath, settings, coverletSettings);

build/common/Utilities/Constants.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ public class Constants
1313
public const string NetVersion60 = "net6.0";
1414
public const string CoreFxVersion31 = "netcoreapp3.1";
1515
public const string FullFxVersion48 = "net48";
16+
17+
public const string NoMono = "NoMono";
18+
public const string NoNet48 = "NoNet48";
19+
public const string NoNetCoreApp31 = "NoNetCoreApp31";
20+
1621
public static readonly string[] VersionsToBuild = { Version60, Version50, Version31 };
1722
public static readonly Architecture[] ArchToBuild = { Architecture.Amd64, Architecture.Arm64 };
1823
public static readonly string[] DistrosToSkip = { Alpine312, Alpine313, Alpine314, Centos7 };

src/GitVersion.Core.Tests/Helpers/TestBase.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ public class TestBase
1111
protected const string NoMonoDescription = "Won't run on Mono due to source information not being available for ShouldMatchApproved.";
1212
protected const string NoMono = "NoMono";
1313
protected const string NoNet48 = "NoNet48";
14+
protected const string NoNetCoreApp31 = "NoNetCoreApp31";
1415
public const string MainBranch = "main";
1516

1617
protected static IServiceProvider ConfigureServices(Action<IServiceCollection> overrideServices = null)

src/GitVersion.MsBuild.Tests/Tasks/GenerateGitVersionInformationTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public void GenerateGitVersionInformationTaskShouldCreateFileInBuildServer()
5050
}
5151

5252
[Test]
53+
[Category(NoNetCoreApp31)]
5354
[Category(NoNet48)]
5455
[Category(NoMono)]
5556
public void GenerateGitVersionInformationTaskShouldCreateFileWhenRunWithMsBuild()
@@ -77,6 +78,7 @@ public void GenerateGitVersionInformationTaskShouldCreateFileWhenRunWithMsBuild(
7778
}
7879

7980
[Test]
81+
[Category(NoNetCoreApp31)]
8082
[Category(NoNet48)]
8183
[Category(NoMono)]
8284
public void GenerateGitVersionInformationTaskShouldCreateFileWhenRunWithMsBuildInBuildServer()

src/GitVersion.MsBuild.Tests/Tasks/GetVersionTaskTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public void GetVersionTaskShouldReturnVersionOutputVariablesForBuildServer()
6161
[TestCase(nameof(VersionVariables.Patch), "4")]
6262
[TestCase(nameof(VersionVariables.MajorMinorPatch), "1.2.4")]
6363
[TestCase(nameof(VersionVariables.FullSemVer), "1.2.4+1")]
64+
[Category(NoNetCoreApp31)]
6465
[Category(NoNet48)]
6566
[Category(NoMono)]
6667
public void GetVersionTaskShouldReturnVersionOutputVariablesWhenRunWithMsBuild(string outputProperty, string version)
@@ -82,6 +83,7 @@ public void GetVersionTaskShouldReturnVersionOutputVariablesWhenRunWithMsBuild(s
8283
[TestCase(nameof(VersionVariables.Patch), "1")]
8384
[TestCase(nameof(VersionVariables.MajorMinorPatch), "1.0.1")]
8485
[TestCase(nameof(VersionVariables.FullSemVer), "1.0.1+1")]
86+
[Category(NoNetCoreApp31)]
8587
[Category(NoNet48)]
8688
[Category(NoMono)]
8789
public void GetVersionTaskShouldReturnVersionOutputVariablesWhenRunWithMsBuildInBuildServer(string outputProperty, string version)

src/GitVersion.MsBuild.Tests/Tasks/UpdateAssemblyInfoTaskTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public void UpdateAssemblyInfoTaskShouldCreateFileInBuildServer()
4141
}
4242

4343
[Test]
44+
[Category(NoNetCoreApp31)]
4445
[Category(NoNet48)]
4546
[Category(NoMono)]
4647
public void UpdateAssemblyInfoTaskShouldCreateFileWhenRunWithMsBuild()
@@ -64,6 +65,7 @@ public void UpdateAssemblyInfoTaskShouldCreateFileWhenRunWithMsBuild()
6465
}
6566

6667
[Test]
68+
[Category(NoNetCoreApp31)]
6769
[Category(NoNet48)]
6870
[Category(NoMono)]
6971
public void UpdateAssemblyInfoTaskShouldCreateFileWhenRunWithMsBuildInBuildServer()

src/GitVersion.MsBuild.Tests/Tasks/WriteVersionInfoTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ public void WriteVersionInfoTaskShouldLogOutputVariablesToBuildOutputInGitHubAct
9393
}
9494

9595
[Test]
96+
[Category(NoNetCoreApp31)]
9697
[Category(NoNet48)]
9798
[Category(NoMono)]
9899
public void WriteVersionInfoTaskShouldNotLogOutputVariablesToBuildOutputWhenRunWithMsBuild()
@@ -110,6 +111,7 @@ public void WriteVersionInfoTaskShouldNotLogOutputVariablesToBuildOutputWhenRunW
110111
}
111112

112113
[Test]
114+
[Category(NoNetCoreApp31)]
113115
[Category(NoNet48)]
114116
[Category(NoMono)]
115117
public void WriteVersionInfoTaskShouldLogOutputVariablesToBuildOutputWhenRunWithMsBuildInAzurePipeline()

0 commit comments

Comments
 (0)