1
0
Fork 0
mirror of https://code.forgejo.org/actions/checkout.git synced 2025-04-29 14:42:59 +02:00
This commit is contained in:
Gonzalo Peci 2024-03-15 15:42:40 +09:00 committed by GitHub
commit ff5874f76b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 219 additions and 103 deletions

View file

@ -809,10 +809,12 @@ async function setup(testName: string): Promise<void> {
sparseCheckoutConeMode: true,
fetchDepth: 1,
fetchTags: false,
fetchParallel: 1,
showProgress: true,
lfs: false,
submodules: false,
nestedSubmodules: false,
submodulesFetchJobs: 1,
persistCredentials: true,
ref: 'refs/heads/main',
repositoryName: 'my-repo',

View 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