[Ubuntu] cache most used GitHub actions

This commit is contained in:
Tingluo Huang
2023-10-11 13:31:13 -04:00
committed by GitHub
parent 32f2e8a812
commit a80012b48e
4 changed files with 43 additions and 0 deletions

View File

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