Files
runner-images/images/win/scripts/Tests/ActionArchiveCache.Tests.ps1
Tingluo Huang c7517abd08 [Windows] cache most used GitHub actions
* Download actions/action_versions latest release on Windows and set ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE.

* feedback

* fix get latest package on Windows.

* invoke test
2023-10-12 10:43:41 +02:00

16 lines
621 B
PowerShell

Describe "ActionArchiveCache" {
Context "Action archive cache directory not empty" {
It "C:\actionarchivecache not empty" {
(Get-ChildItem -Path "C:\actionarchivecache\*.zip" -Recurse).Count | Should -BeGreaterThan 0
}
}
Context "Action zipball not empty" {
$testCases = Get-ChildItem -Path "C:\actionarchivecache\*.zip" -Recurse | ForEach-Object { @{ ActionZipball = $_.FullName } }
It "<ActionZipball>" -TestCases $testCases {
param ([string] $ActionZipball)
(Get-Item "$ActionZipball").Length | Should -BeGreaterThan 0
}
}
}