Skip to content

Commit c9697b6

Browse files
Use locked-mode to restore packages
1 parent 47b2e96 commit c9697b6

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

bin/test.ps1

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ param (
2626
$ErrorActionPreference = "Stop"
2727
$PSNativeCommandUseErrorActionPreference = $true
2828

29-
function Invoke-Tests($Path) {
30-
& dotnet test $Path
31-
}
32-
3329
function Prepare-Exercise($Path) {
3430
$files = Get-Content (Join-Path $Path ".meta" "config.json") -Raw | ConvertFrom-Json | Select-Object -ExpandProperty files
3531

@@ -81,7 +77,8 @@ function Restore-Exercises($Exercises) {
8177
}
8278

8379
function Run-Tests($Path) {
84-
& dotnet test $Path
80+
& dotnet restore --locked-mode $Path
81+
& dotnet test --no-restore $Path
8582
}
8683

8784
function Find-Exercise-Path($Exercise, $Exercises) {
@@ -129,7 +126,8 @@ function Parse-Exercises {
129126

130127
function Build-Generators {
131128
Write-Output "Build generators"
132-
& dotnet build generators
129+
& dotnet restore --locked-mode generators
130+
& dotnet build --no-restore generators
133131
}
134132

135133
function Test-Refactoring-Exercise-Default-Implementations {

0 commit comments

Comments
 (0)