diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc8fd17116..f340cc51f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,8 +70,7 @@ jobs: # Work around runtime failures on the GH Actions runner dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org .\make.ps1 check - dotnet build OpenRA.Test\OpenRA.Test.csproj -c Debug --nologo -p:TargetPlatform=win-x64 - dotnet test bin\OpenRA.Test.dll --test-adapter-path:. + .\make.ps1 tests - name: Check Mods run: | diff --git a/make.ps1 b/make.ps1 index 800da7909a..20a2aed946 100644 --- a/make.ps1 +++ b/make.ps1 @@ -110,6 +110,13 @@ function Test-Command InvokeCommand "$utilityPath ra --check-yaml" } +function Tests-Command +{ + Write-Host "Running unit tests..." -ForegroundColor Cyan + dotnet build OpenRA.Test\OpenRA.Test.csproj -c Debug --nologo -p:TargetPlatform=win-x64 + dotnet test bin\OpenRA.Test.dll --test-adapter-path:. +} + function Check-Command { Write-Host "Compiling in Debug configuration..." -ForegroundColor Cyan @@ -253,6 +260,7 @@ switch ($execute) {"version", "v" -contains $_} { Version-Command } {"clean", "c" -contains $_} { Clean-Command } {"test", "t" -contains $_} { Test-Command } + {"tests", "ut" -contains $_} { Tests-Command } {"check", "ck" -contains $_} { Check-Command } {"check-scripts", "cs" -contains $_} { Check-Scripts-Command } Default { Write-Host ("Invalid command '{0}'" -f $command) }