Skip to content

Commit 33bdd30

Browse files
committed
Enable source generator tests in CI
1 parent 88af510 commit 33bdd30

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

build/build.cake

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,18 @@ Task("Test")
270270
ArgumentCustomization = arg => arg.Append($"-s {baseDir}/.runsettings /p:Platform=AnyCPU"),
271271
};
272272
DotNetCoreTest(file.FullPath, testSettings);
273+
}).DoesForEach(GetFiles(baseDir + "/**/UnitTests.SourceGenerators.csproj"), (file) =>
274+
{
275+
Information("\nRunning NetCore Source Generator Unit Tests");
276+
var testSettings = new DotNetCoreTestSettings
277+
{
278+
Configuration = configuration,
279+
NoBuild = true,
280+
Loggers = new[] { "trx;LogFilePrefix=VsTestResults" },
281+
Verbosity = DotNetCoreVerbosity.Normal,
282+
ArgumentCustomization = arg => arg.Append($"-s {baseDir}/.runsettings /p:Platform=AnyCPU"),
283+
};
284+
DotNetCoreTest(file.FullPath, testSettings);
273285
}).DeferOnError();
274286

275287
Task("UITest")

0 commit comments

Comments
 (0)