travis: Set up to test commit messages
authorMark Lobodzinski <mark@lunarg.com>
Mon, 9 Apr 2018 21:28:28 +0000 (15:28 -0600)
committerMark Lobodzinski <mark@lunarg.com>
Thu, 12 Apr 2018 18:54:16 +0000 (12:54 -0600)
Change-Id: I64adcdb59329eed77cd7c0dd4ff89362f73f72f4

.travis.yml

index 2496ee9..0ccd462 100644 (file)
@@ -5,9 +5,14 @@ dist: trusty
 sudo: required
 language: cpp
 
+# This line necessary for allow_failures operation
+env:
+
 matrix:
   # Show final status immediately if a test fails.
   fast_finish: true
+  allow_failures:
+    - env: CHECK_COMMIT_FORMAT=ON
   include:
     # Android build.
     - os: linux
@@ -27,6 +32,8 @@ matrix:
       env: VULKAN_BUILD_TARGET=LINUX
     # Check for proper clang formatting in the pull request.
     - env: CHECK_FORMAT=ON
+    # Check for proper commit message formatting for commits in PR
+    - env: CHECK_COMMIT_FORMAT=ON
 
 cache: ccache
 
@@ -121,6 +128,13 @@ script:
         echo "Skipping clang-format check since this is not a pull request."
       fi
     fi
+  - |
+    if [[ "$CHECK_COMMIT_FORMAT" == "ON" ]]; then
+      if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
+        echo "Checking commit message formats:  See CONTRIBUTING.md"
+        ./scripts/check_commit_message_format.sh
+      fi
+    fi
   - set +e
 
 notifications: