Skip to content

Commit 7c82d27

Browse files
Run tests in parallel
Run the test projects in parallel with each other.
1 parent 4c5d6fc commit 7c82d27

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

build.ps1

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ $libraryProjects = @(
1919
(Join-Path $solutionPath "src" "Logging.XUnit.v3" "MartinCostello.Logging.XUnit.v3.csproj")
2020
)
2121

22-
$testProjects = @(
23-
(Join-Path $solutionPath "tests" "Logging.XUnit.Tests" "MartinCostello.Logging.XUnit.Tests.csproj")
24-
(Join-Path $solutionPath "tests" "Logging.XUnit.v3.Tests" "MartinCostello.Logging.XUnit.v3.Tests.csproj")
25-
)
26-
2722
$dotnetVersion = (Get-Content $sdkFile | Out-String | ConvertFrom-Json).sdk.version
2823

2924
$installDotNetSdk = $false;
@@ -90,7 +85,7 @@ function DotNetPack {
9085
}
9186

9287
function DotNetTest {
93-
param([string]$Project)
88+
param()
9489

9590
$additionalArgs = @()
9691

@@ -99,7 +94,7 @@ function DotNetTest {
9994
$additionalArgs += "GitHubActions;report-warnings=false"
10095
}
10196

102-
& $dotnet test $Project --configuration "Release" $additionalArgs
97+
& $dotnet test --configuration "Release" $additionalArgs
10398

10499
if ($LASTEXITCODE -ne 0) {
105100
throw "dotnet test failed with exit code $LASTEXITCODE"
@@ -113,7 +108,5 @@ ForEach ($libraryProject in $libraryProjects) {
113108

114109
if (-Not $SkipTests) {
115110
Write-Information "Running tests..."
116-
ForEach ($testProject in $testProjects) {
117-
DotNetTest $testProject
118-
}
111+
DotNetTest
119112
}

0 commit comments

Comments
 (0)