Skip to content

Commit 7b97d30

Browse files
committed
Fix unit tets
1 parent df1ebb7 commit 7b97d30

1 file changed

Lines changed: 23 additions & 5 deletions

File tree

.github/workflows/test.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,21 +82,39 @@ jobs:
8282

8383
###########################################################################################
8484

85-
- name: bump should be patch (0.0.3) NOT minor (0.1.0) because merge bump is disabled
85+
- name: make a feat/ branch and merge into main to trigger a minor bump
86+
run: |
87+
git --version
88+
git config user.name "GitHub Actions Bot"
89+
git config user.email "<>"
90+
git branch feat/merge-test
91+
git switch feat/merge-test
92+
touch merge-test
93+
echo 'merge-test' > merge-test
94+
git add merge-test
95+
git commit -m "merge-test"
96+
git checkout main
97+
git merge feat/merge-test --no-ff --commit --no-edit
98+
99+
git log
100+
echo "-------------------"
101+
git log --merges -n 1
102+
103+
- name: bump should be (0.0.2) NOT (0.1.0) because merge bump is disabled
86104
id: version_no_merge_bump
87105
run: |
88-
echo "===> bump should be patch (0.0.3) NOT minor (0.1.0) because merge bump is disabled";
106+
echo "===> bump should be patch (0.0.2) NOT minor (0.1.0) because merge bump is disabled";
89107
./version-bump.sh
90108
env:
91109
GHA_TAG: latest
92110
GHA_ENABLE_MERGE_COMMIT_BUMP: "false"
93111

94-
- name: test that 0.0.2 has bumped to 0.0.3 (patch) and NOT 0.1.0 (minor)
112+
- name: test that 0.0.1 has bumped to 0.0.2 (patch) and NOT 0.1.0 (minor)
95113
run: |
96-
if [[ "$version_tag_numeric" == '0.0.3' ]];then
114+
if [[ "$version_tag_numeric" == '0.0.2' ]];then
97115
echo "winning"
98116
else
99-
echo "Expected 0.0.3 but got $version_tag_numeric"
117+
echo "Expected 0.0.2 but got $version_tag_numeric"
100118
exit 1
101119
fi
102120
shell: bash

0 commit comments

Comments
 (0)