Files
runner-images-sangeeth/images/macos/tests/ActionArchiveCache.Tests.ps1
Tingluo Huang d77bb13e97 [macOS] cache most used GitHub actions
* Download actions/action_versions latest release on macOS and set ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE.

* Feedback.
2023-10-12 10:54:39 +02:00

16 lines
644 B
PowerShell

Describe "ActionArchiveCache" {
Context "Action archive cache directory not empty" {
It "$HOME/actionarchivecache not empty" {
(Get-ChildItem -Path "$env:HOME/actionarchivecache/*.tar.gz" -Recurse).Count | Should -BeGreaterThan 0
}
}
Context "Action tarball not empty" {
$testCases = Get-ChildItem -Path "$env:HOME/actionarchivecache/*.tar.gz" -Recurse | ForEach-Object { @{ ActionTarball = $_.FullName } }
It "<ActionTarball>" -TestCases $testCases {
param ([string] $ActionTarball)
(Get-Item "$ActionTarball").Length | Should -BeGreaterThan 0
}
}
}