File tree Expand file tree Collapse file tree 4 files changed +27
-39
lines changed
Expand file tree Collapse file tree 4 files changed +27
-39
lines changed Original file line number Diff line number Diff line change 7272 shell : bash
7373 run : __test__/verify-side-by-side.sh
7474
75- # Sparse checkout
75+ # Sparse checkout
7676 - name : Sparse checkout
7777 uses : ./
7878 with :
8282 dist
8383 path : sparse-checkout
8484
85- - name : Verify sparse checkout basic
86- run : __test__/verify-sparse-checkout-basic.sh
87- - name : Verify sparse checkout example
85+ - name : Verify sparse checkout
8886 run : __test__/verify-sparse-checkout.sh
8987
9088 # LFS
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 99# Verify sparse-checkout
1010cd sparse-checkout
1111
12+ SPARSE=$( git sparse-checkout list)
13+
14+ if [ " $? " != " 0" ]; then
15+ echo " Failed to validate sparse-checkout"
16+ exit 1
17+ fi
18+
19+ # Check that sparse-checkout list is not empty
20+ if [ -z " $SPARSE " ]; then
21+ echo " Expected sparse-checkout list to not be empty"
22+ exit 1
23+ fi
24+
25+ # Check that all folders of the sparse checkout exist
26+ for pattern in $SPARSE
27+ do
28+ if [ ! -d " $pattern " ]; then
29+ echo " Expected directory '$pattern ' to exist"
30+ exit 1
31+ fi
32+ done
33+
1234checkSparse () {
1335 if [ ! -d " ./$1 " ]; then
1436 echo " Expected directory '$1 ' to exist"
@@ -24,12 +46,12 @@ checkSparse () {
2446 done
2547}
2648
27- # Check that all folders and its childrens has been fetched correctly
49+ # Check that all folders and their children have been checked out
2850checkSparse __test__
2951checkSparse .github
3052checkSparse dist
3153
32- # Check that only sparse-checkout folders has been fetched
54+ # Check that only sparse-checkout folders have been checked out
3355for pattern in $( git ls-tree --name-only HEAD)
3456do
3557 if [ -d " $pattern " ]; then
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ inputs:
5656 sparse-checkout :
5757 description : >
5858 Do a sparse checkout on given patterns.
59- Each pattern should be sepparated with new lines
59+ Each pattern should be separated with new lines
6060 default : null
6161 fetch-depth :
6262 description : ' Number of commits to fetch. 0 indicates all history for all branches and tags.'
You can’t perform that action at this time.
0 commit comments