[macOS] cache most used GitHub actions

* Download actions/action_versions latest release on macOS and set ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE.

* Feedback.
This commit is contained in:
Tingluo Huang
2023-10-12 04:54:39 -04:00
committed by GitHub
parent c7517abd08
commit d77bb13e97
8 changed files with 43 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
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
}
}
}