@@ -22,11 +22,11 @@ jobs:
2222 - name : Test default checkout
2323 uses : ./
2424 with :
25- checkout_dir : step1
25+ checkout_dir : step.default
2626
2727 - name : Directory exists
2828 run : |
29- if [ ! -d ./step1 ]; then
29+ if [ ! -d ./step.default ]; then
3030 echo '::error:: Should be able to be checked out'
3131 exit 1
3232 fi
@@ -35,11 +35,11 @@ jobs:
3535 uses : ./
3636 with :
3737 branch_name : main
38- checkout_dir : step2
38+ checkout_dir : step.branch_name
3939
4040 - name : Directory exists
4141 run : |
42- if [ ! -d ./step2 ]; then
42+ if [ ! -d ./step.branch_name ]; then
4343 echo '::error:: Should be able to be checked out'
4444 exit 1
4545 fi
@@ -48,24 +48,38 @@ jobs:
4848 uses : ./
4949 with :
5050 branch_name : refs/heads/main
51- checkout_dir : step3
51+ checkout_dir : step.long_branch_name
5252
5353 - name : Directory exists
5454 run : |
55- if [ ! -d ./step3 ]; then
55+ if [ ! -d ./step.long_branch_name ]; then
5656 echo '::error:: Should be able to be checked out'
5757 exit 1
5858 fi
5959
60+ - name : Test checkout with branch_name as origin/main
61+ continue-on-error : true
62+ uses : ./
63+ with :
64+ branch_name : origin/main
65+ checkout_dir : step.branch_name_include_origin
66+
67+ - name : Directory does not exists
68+ run : |
69+ if [ -d ./step.branch_name_include_origin ]; then
70+ echo '::error:: Should fail checking out'
71+ exit 1
72+ fi
73+
6074 - name : Test checkout and no depth option
6175 uses : ./
6276 with :
6377 depth : ' '
64- checkout_dir : step4
78+ checkout_dir : step.no_depth_option
6579
6680 - name : Directory exists
6781 run : |
68- if [ ! -d ./step4 ]; then
82+ if [ ! -d ./step.no_depth_option ]; then
6983 echo '::error:: Should be able to be checked out'
7084 exit 1
7185 fi
@@ -76,11 +90,11 @@ jobs:
7690 ACT : 1
7791 with :
7892 depth : ' '
79- checkout_dir : step5
93+ checkout_dir : step.act_presented
8094
8195 - name : Directory does not exist
8296 run : |
83- if [ -d ./step5 ]; then
97+ if [ -d ./step.act_presented ]; then
8498 echo '::error:: Should not be able to be checked out, when ACT environment is exists'
8599 exit 1
86100 fi
@@ -89,14 +103,14 @@ jobs:
89103 uses : ./
90104 with :
91105 depth : ' '
92- checkout_dir : step6
106+ checkout_dir : step.authoer
93107
94108 - name : Have user.name and user.email on .git/config?
95109 run : |
96110 set -xe
97111 pwd
98112 ls -al
99- pushd step6
113+ pushd step.authoer
100114 if [ "${GITHUB_ACTOR}" != "$(git config --local --get user.name)" ]; then
101115 echo '::error:: "git config --local --get user.name" Should be equal' "$GITHUB_ACTOR"
102116 exit 1
0 commit comments