mirror of
https://code.forgejo.org/actions/checkout.git
synced 2025-04-27 06:19:54 +02:00
Allow configuration of submodule.fetchJobs
This commit is contained in:
parent
b4ffde65f4
commit
2bd5ef5487
11 changed files with 271 additions and 102 deletions
|
@ -811,6 +811,7 @@ async function setup(testName: string): Promise<void> {
|
|||
lfs: false,
|
||||
submodules: false,
|
||||
nestedSubmodules: false,
|
||||
submodulesFetchJobs: '1',
|
||||
persistCredentials: true,
|
||||
ref: 'refs/heads/main',
|
||||
repositoryName: 'my-repo',
|
||||
|
|
33
__test__/verify-submodules-with-jobs.sh
Executable file
33
__test__/verify-submodules-with-jobs.sh
Executable file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ ! -f "./submodules-recursive/regular-file.txt" ]; then
|
||||
echo "Expected regular file does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "./submodules-recursive/submodule-level-1/submodule-file.txt" ]; then
|
||||
echo "Expected submodule file does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "./submodules-recursive/submodule-level-1/submodule-level-2/nested-submodule-file.txt" ]; then
|
||||
echo "Expected nested submodule file does not exists"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Testing fetchJobs exists"
|
||||
git config --local --get-regexp submodules.fetchJobs | grep 10
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Failed to validate fetchJobs configuration"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Testing persisted credential"
|
||||
pushd ./submodules-recursive/submodule-level-1/submodule-level-2
|
||||
git config --local --name-only --get-regexp http.+extraheader && git fetch
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Failed to validate persisted credential"
|
||||
popd
|
||||
exit 1
|
||||
fi
|
||||
popd
|
Loading…
Add table
Add a link
Reference in a new issue