mirror of
https://github.com/tiktok/sparo.git
synced 2024-11-14 19:35:12 -05:00
chore: add test
This commit is contained in:
parent
3c96313f84
commit
2155169d55
5 changed files with 86 additions and 4 deletions
|
@ -322,9 +322,11 @@ ${availableProfiles.join(',')}
|
|||
});
|
||||
}
|
||||
|
||||
await this._gitSparseCheckoutService.checkoutAsync({
|
||||
selections: projectsSelections,
|
||||
checkoutAction: 'add'
|
||||
});
|
||||
if (projectsSelections.length > 0) {
|
||||
await this._gitSparseCheckoutService.checkoutAsync({
|
||||
selections: projectsSelections,
|
||||
checkoutAction: 'add'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,3 +21,5 @@ Options:
|
|||
already exists, reset it to <start-point> [boolean]
|
||||
--profile [array] [default: []]
|
||||
--add-profile [array] [default: []]
|
||||
--to [array] [default: []]
|
||||
--from [array] [default: []]
|
||||
|
|
29
build-tests/sparo-real-repo-test/etc/checkout-from.txt
Normal file
29
build-tests/sparo-real-repo-test/etc/checkout-from.txt
Normal file
|
@ -0,0 +1,29 @@
|
|||
Running "sparo checkout --from build-test-utilities":
|
||||
|
||||
[bold]Sparo accelerator for Git __VERSION__ -[normal][cyan] https://tiktok.github.io/sparo/[default]
|
||||
Node.js version is __VERSION__ (LTS)
|
||||
Git version is __VERSION__
|
||||
|
||||
|
||||
[gray]--[[default] [bold]git checkout[normal] [gray]]-------------------------------------------------------------[default]
|
||||
Your branch is up to date with 'origin/test-artifacts/sparo-real-repo-test'.
|
||||
[gray]-------------------------------------------------------------------------------[default]
|
||||
|
||||
Syncing checkout with the Sparo profile: my-build-test
|
||||
|
||||
Checking out and updating core files...
|
||||
|
||||
[gray]--[[default] [bold]git sparse-checkout[normal] [gray]]------------------------------------------------------[default]
|
||||
[gray]-------------------------------------------------------------------------------[default]
|
||||
|
||||
Checking out skeleton...
|
||||
|
||||
[gray]--[[default] [bold]git sparse-checkout[normal] [gray]]------------------------------------------------------[default]
|
||||
[gray]-------------------------------------------------------------------------------[default]
|
||||
|
||||
Checking out __FOLDER_COUNT__ folders...
|
||||
|
||||
[gray]--[[default] [bold]git sparse-checkout[normal] [gray]]------------------------------------------------------[default]
|
||||
[gray]-------------------------------------------------------------------------------[default]
|
||||
|
||||
Sparse checkout completed in __DURATION__
|
35
build-tests/sparo-real-repo-test/etc/checkout-to.txt
Normal file
35
build-tests/sparo-real-repo-test/etc/checkout-to.txt
Normal file
|
@ -0,0 +1,35 @@
|
|||
Running "sparo checkout --to sparo-output-test":
|
||||
|
||||
[bold]Sparo accelerator for Git __VERSION__ -[normal][cyan] https://tiktok.github.io/sparo/[default]
|
||||
Node.js version is __VERSION__ (LTS)
|
||||
Git version is __VERSION__
|
||||
|
||||
|
||||
[gray]--[[default] [bold]git checkout[normal] [gray]]-------------------------------------------------------------[default]
|
||||
Your branch is up to date with 'origin/test-artifacts/sparo-real-repo-test'.
|
||||
[gray]-------------------------------------------------------------------------------[default]
|
||||
|
||||
Syncing checkout with the Sparo profile: my-build-test
|
||||
|
||||
Checking out and updating core files...
|
||||
|
||||
[gray]--[[default] [bold]git sparse-checkout[normal] [gray]]------------------------------------------------------[default]
|
||||
[gray]-------------------------------------------------------------------------------[default]
|
||||
|
||||
Checking out skeleton...
|
||||
|
||||
[gray]--[[default] [bold]git sparse-checkout[normal] [gray]]------------------------------------------------------[default]
|
||||
[gray]-------------------------------------------------------------------------------[default]
|
||||
|
||||
Checking out __FOLDER_COUNT__ folders...
|
||||
|
||||
[gray]--[[default] [bold]git sparse-checkout[normal] [gray]]------------------------------------------------------[default]
|
||||
[gray]-------------------------------------------------------------------------------[default]
|
||||
|
||||
Sparse checkout completed in __DURATION__
|
||||
Checking out __FOLDER_COUNT__ folders...
|
||||
|
||||
[gray]--[[default] [bold]git sparse-checkout[normal] [gray]]------------------------------------------------------[default]
|
||||
[gray]-------------------------------------------------------------------------------[default]
|
||||
|
||||
Sparse checkout completed in __DURATION__
|
|
@ -80,6 +80,20 @@ export async function runAsync(runScriptOptions: IRunScriptOptions): Promise<voi
|
|||
args: ['checkout', '--profile', 'my-build-test'],
|
||||
currentWorkingDirectory: repoFolder
|
||||
},
|
||||
// sparo checkout --to sparo-output-test
|
||||
{
|
||||
kind: 'sparo-command',
|
||||
name: 'checkout-to',
|
||||
args: ['checkout', '--to', 'sparo-output-test'],
|
||||
currentWorkingDirectory: repoFolder
|
||||
},
|
||||
// sparo checkout --from build-test-utilities
|
||||
{
|
||||
kind: 'sparo-command',
|
||||
name: 'checkout-from',
|
||||
args: ['checkout', '--from', 'build-test-utilities'],
|
||||
currentWorkingDirectory: repoFolder
|
||||
},
|
||||
// sparo list-profiles
|
||||
{
|
||||
kind: 'sparo-command',
|
||||
|
|
Loading…
Reference in a new issue