misc, test: Some quality of life improvements
Add a fold in github actions output around the ragel build. Run the commit-message test locally, so that error can be detected before pushing to CI. We also now accept two-letter topics. Some minor improvement in the testing scripts.
This commit is contained in:
committed by
James Shubin
parent
29ec867ac7
commit
edcb04d1a9
@@ -10,11 +10,12 @@ echo running "$0"
|
||||
ROOT=$(dirname "${BASH_SOURCE}")/..
|
||||
cd "${ROOT}" || exit 1
|
||||
|
||||
commit_title_regex='^\([a-z0-9]\(\(, \)\|[a-z0-9]\)\+[a-z0-9]: \)\+[A-Z0-9][^:]\+[^:.]$'
|
||||
commit_title_regex='^\([a-z0-9]\(\(, \)\|[a-z0-9]\)*[a-z0-9]: \)\+[A-Z0-9][^:]\+[^:.]$'
|
||||
|
||||
# Testing the regex itself.
|
||||
|
||||
# Correct patterns.
|
||||
[[ $(echo "ci: Bar" | grep -c "$commit_title_regex") -eq 1 ]]
|
||||
[[ $(echo "foo, bar: Bar" | grep -c "$commit_title_regex") -eq 1 ]]
|
||||
[[ $(echo "foo: Bar" | grep -c "$commit_title_regex") -eq 1 ]]
|
||||
[[ $(echo "f1oo, b2ar: Bar" | grep -c "$commit_title_regex") -eq 1 ]]
|
||||
@@ -183,5 +184,13 @@ then
|
||||
test_commit_message_common_bugs $commit
|
||||
done
|
||||
fi
|
||||
else # assume local branch
|
||||
commits=$(git log --no-merges --format=%H origin/master..HEAD)
|
||||
for commit in $commits
|
||||
do
|
||||
test_commit_message $commit
|
||||
test_commit_message_body $commit
|
||||
test_commit_message_common_bugs $commit
|
||||
done
|
||||
fi
|
||||
echo 'PASS'
|
||||
|
||||
Reference in New Issue
Block a user