File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -36,20 +36,23 @@ jobs:
3636 **/*.slnx
3737 **/*.csproj
3838
39- - name : Restore (csproj in repo only )
39+ - name : Restore (each csproj )
4040 shell : pwsh
4141 run : |
42- $projects = Get-ChildItem -Recurse -Filter *.csproj | ForEach-Object { $_.FullName }
42+ $projects = Get-ChildItem -Recurse -Filter *.csproj -File
4343 if (-not $projects) { Write-Host "No csproj files found"; exit 1 }
44- dotnet restore $projects
44+ foreach ($p in $projects) {
45+ echo "Restoring $($p.FullName)"
46+ dotnet restore --nologo "$($p.FullName)"
47+ }
4548
4649 - name : Build (Release)
4750 shell : pwsh
4851 run : |
49- $projects = Get-ChildItem -Recurse -Filter *.csproj | ForEach-Object { $_.FullName }
52+ $projects = Get-ChildItem -Recurse -Filter *.csproj -File | ForEach-Object { $_.FullName }
5053 foreach ($p in $projects) {
5154 echo "Building $p"
52- dotnet build $p --configuration Release --no-restore /p:ContinuousIntegrationBuild=true
55+ dotnet build "$p" --configuration Release --no-restore /p:ContinuousIntegrationBuild=true
5356 }
5457
5558 - name : Test
5962 $testProjects = Get-ChildItem -Recurse -Include *Tests.csproj,*Test.csproj -File | ForEach-Object { $_.FullName }
6063 foreach ($tp in $testProjects) {
6164 echo "Testing $tp"
62- dotnet test $tp --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage" --logger "trx;LogFileName=test_results.trx"
65+ dotnet test " $tp" --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage" --logger "trx;LogFileName=test_results.trx"
6366 }
6467
6568 - name : Upload test results
You can’t perform that action at this time.
0 commit comments