File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 9
9
<GenerateDocumentationFile >false</GenerateDocumentationFile >
10
10
<ImplicitUsings >enable</ImplicitUsings >
11
11
<LangVersion >latest</LangVersion >
12
+ <MSBuildTreatWarningsAsErrors >true</MSBuildTreatWarningsAsErrors >
12
13
<NeutralLanguage >en-US</NeutralLanguage >
13
14
<Nullable >enable</Nullable >
14
15
<PackageLicenseExpression >Apache-2.0</PackageLicenseExpression >
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ if ($installDotNetSdk -eq $true) {
79
79
}
80
80
81
81
function DotNetTest {
82
- param ()
82
+ param ([ string ] $Project )
83
83
84
84
$additionalArgs = @ ()
85
85
@@ -88,7 +88,7 @@ function DotNetTest {
88
88
$additionalArgs += " GitHubActions;report-warnings=false"
89
89
}
90
90
91
- & $dotnet test -- output $OutputPath -- configuration $Configuration $additionalArgs
91
+ & $dotnet test $Project -- output $OutputPath -- configuration $Configuration $additionalArgs
92
92
93
93
if ($LASTEXITCODE -ne 0 ) {
94
94
throw " dotnet test failed with exit code $LASTEXITCODE "
@@ -110,13 +110,18 @@ $publishProjects = @(
110
110
(Join-Path $solutionPath " src" " TodoApp" " TodoApp.csproj" )
111
111
)
112
112
113
+ $testProjects = @ (
114
+ (Join-Path $solutionPath " tests" " TodoApp.Tests" " TodoApp.Tests.csproj" )
115
+ )
116
+
113
117
Write-Output " Publishing solution..."
114
118
ForEach ($project in $publishProjects ) {
115
119
DotNetPublish $project $Configuration
116
120
}
117
121
118
122
if (-Not $SkipTests ) {
119
- Write-Output " Testing solution..."
120
- DotNetTest
123
+ Write-Host " Testing $ ( $testProjects.Count ) project(s)..." - ForegroundColor Green
124
+ ForEach ($project in $testProjects ) {
125
+ DotNetTest $project
126
+ }
121
127
}
122
-
You can’t perform that action at this time.
0 commit comments