add sanity testing workflow and docs
Signed-off-by: Florian Wagner <h2floh@github.com>
This commit is contained in:
17
script/bootstrap-sanity-test.ps1
Normal file
17
script/bootstrap-sanity-test.ps1
Normal file
@@ -0,0 +1,17 @@
|
||||
# Determine file to download based on current OS
|
||||
if($IsLinux) {
|
||||
$file_postfix = "linux_amd64"
|
||||
} elseif ($IsWindows) {
|
||||
$file_postfix = "windows_amd64"
|
||||
} elseif ($IsMacOS) {
|
||||
$file_postfix = "darwin_amd64"
|
||||
}
|
||||
|
||||
# Download release to test
|
||||
curl -OL "https://github.com/actions/actions-sync/releases/download/v$Env:RELEASEDATE/gh_$Env:RELEASEDATE`_$file_postfix.tar.gz"
|
||||
|
||||
# extract
|
||||
tar -xvzf "gh_$Env:RELEASEDATE`_$file_postfix.tar.gz"
|
||||
|
||||
# prepare cache directory
|
||||
mkdir -p cache
|
||||
23
script/execute-sanity-test.ps1
Normal file
23
script/execute-sanity-test.ps1
Normal file
@@ -0,0 +1,23 @@
|
||||
# Testing Pull Single Repo
|
||||
echo "`n#########################`n### Testing Pull Single Repo`n#########################"
|
||||
bin/actions-sync pull --cache-dir "cache" --repo-name "actions/setup-node"
|
||||
|
||||
# Testing Sync Single Repo
|
||||
echo "`n#########################`n### Testing Sync Single Repo`n#########################"
|
||||
bin/actions-sync sync --cache-dir "cache" --destination-token $Env:TOKEN --destination-url $Env:TEST_INSTANCE_URL --repo-name "actions/setup-node" --actions-admin-user actions-admin
|
||||
|
||||
# Testing Pull Multiple Repos
|
||||
echo "`n#########################`n### Testing Pull Multiple Repos`n#########################"
|
||||
bin/actions-sync pull --cache-dir "cache" --repo-name-list "actions/setup-node,actions/checkout"
|
||||
|
||||
# Testing Push Multiple Existing Repos
|
||||
echo "`n#########################`n### Testing Push Multiple Existing Repos`n#########################"
|
||||
bin/actions-sync push --cache-dir "cache" --destination-token $Env:TOKEN --destination-url $Env:TEST_INSTANCE_URL --repo-name-list "actions/setup-node,actions/checkout" --actions-admin-user actions-admin
|
||||
|
||||
# Testing Sync Multiple Existing Repos
|
||||
echo "`n#########################`n### Testing Sync Multiple Existing Repos`n#########################"
|
||||
bin/actions-sync sync --cache-dir "cache" --destination-token $Env:TOKEN --destination-url $Env:TEST_INSTANCE_URL --repo-name-list "actions/setup-node,actions/checkout" --actions-admin-user actions-admin
|
||||
|
||||
# Testing Sync New Single Repo
|
||||
echo "`n#########################`n### Testing Sync New Single Repo`n#########################"
|
||||
bin/actions-sync sync --cache-dir "cache" --destination-token $Env:TOKEN --destination-url $Env:TEST_INSTANCE_URL --repo-name-list "actions/actions-sync" --actions-admin-user actions-admin
|
||||
Reference in New Issue
Block a user