Skip to content

Commit 5a03d18

Browse files
committed
fixed workflow hopefully
1 parent 7ac135c commit 5a03d18

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/build-test.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff 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
@@ -59,7 +62,7 @@ jobs:
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

0 commit comments

Comments
 (0)