File tree Expand file tree Collapse file tree 8 files changed +43
-0
lines changed
configuration/environment Expand file tree Collapse file tree 8 files changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ export NUNIT3_PATH=/Library/Developer/nunit/3.6.0
1212
1313export AGENT_TOOLSDIRECTORY=$HOME /hostedtoolcache
1414export RUNNER_TOOL_CACHE=$HOME /hostedtoolcache
15+ export ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE=$HOME /actionarchivecache
1516
1617export PATH=/Library/Frameworks/Mono.framework/Versions/Current/Commands:$PATH
1718export PATH=/Library/Frameworks/Python.framework/Versions/Current/bin:$PATH
Original file line number Diff line number Diff line change 1+ #! /bin/bash -e -o pipefail
2+
3+ # ###############################################################################
4+ # # File: action-archive-cache.sh
5+ # # Desc: Download latest release from https://github.com/actions/action-verions
6+ # # and un-tar to $HOME/actionarchivecache
7+ # # Maintainer: #actions-runtime and @TingluoHuang
8+ # ###############################################################################
9+
10+ source ~ /utils/utils.sh
11+
12+ echo " Check if ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE folder exist..."
13+ if [ ! -d $ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE ]; then
14+ mkdir -p $ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE
15+ fi
16+
17+ downloadUrl=$( get_github_package_download_url " actions/action-versions" " contains(\" action-versions.tar.gz\" )" " latest" )
18+ echo " Downloading action-versions $downloadUrl "
19+ download_with_retries " $downloadUrl " " /tmp" action-versions.tar.gz
20+ tar -xzf /tmp/action-versions.tar.gz -C $ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE
21+
22+ invoke_tests " ActionArchiveCache"
Original file line number Diff line number Diff line change 183183 "type" : " shell" ,
184184 "execute_command" : " chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}" ,
185185 "scripts" : [
186+ " ./provision/core/action-archive-cache.sh" ,
186187 " ./provision/core/commonutils.sh" ,
187188 " ./provision/core/llvm.sh" ,
188189 " ./provision/core/golang.sh" ,
Original file line number Diff line number Diff line change @@ -198,6 +198,7 @@ build {
198198 }
199199 provisioner "shell" {
200200 scripts = [
201+ " ./provision/core/action-archive-cache.sh" ,
201202 " ./provision/core/llvm.sh" ,
202203 " ./provision/core/golang.sh" ,
203204 " ./provision/core/swiftlint.sh" ,
Original file line number Diff line number Diff line change 185185 "type" : " shell" ,
186186 "execute_command" : " chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}" ,
187187 "scripts" : [
188+ " ./provision/core/action-archive-cache.sh" ,
188189 " ./provision/core/llvm.sh" ,
189190 " ./provision/core/golang.sh" ,
190191 " ./provision/core/swiftlint.sh" ,
Original file line number Diff line number Diff line change @@ -194,6 +194,7 @@ build {
194194 }
195195 provisioner "shell" {
196196 scripts = [
197+ " ./provision/core/action-archive-cache.sh" ,
197198 " ./provision/core/llvm.sh" ,
198199 " ./provision/core/swiftlint.sh" ,
199200 " ./provision/core/openjdk.sh" ,
Original file line number Diff line number Diff line change @@ -194,6 +194,7 @@ build {
194194 }
195195 provisioner "shell" {
196196 scripts = [
197+ " ./provision/core/action-archive-cache.sh" ,
197198 " ./provision/core/llvm.sh" ,
198199 " ./provision/core/openjdk.sh" ,
199200 " ./provision/core/rust.sh" ,
Original file line number Diff line number Diff line change 1+ Describe " ActionArchiveCache" {
2+ Context " Action archive cache directory not empty" {
3+ It " $HOME /actionarchivecache not empty" {
4+ (Get-ChildItem - Path " $env: HOME /actionarchivecache/*.tar.gz" - Recurse).Count | Should - BeGreaterThan 0
5+ }
6+ }
7+
8+ Context " Action tarball not empty" {
9+ $testCases = Get-ChildItem - Path " $env: HOME /actionarchivecache/*.tar.gz" - Recurse | ForEach-Object { @ { ActionTarball = $_.FullName } }
10+ It " <ActionTarball>" - TestCases $testCases {
11+ param ([string ] $ActionTarball )
12+ (Get-Item " $ActionTarball " ).Length | Should - BeGreaterThan 0
13+ }
14+ }
15+ }
You can’t perform that action at this time.
0 commit comments