Skip to content

Commit

Permalink
Require tests for feature/bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
fao89 committed Sep 8, 2020
1 parent a6eb0dd commit efc78f2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .travis/pre_before_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

set -mveuo pipefail

REQUIRES_TEST=$(git diff --name-only $TRAVIS_COMMIT_RANGE | grep -E 'feature|bugfix')
CONTAINS_TEST=$(git diff --name-only $TRAVIS_COMMIT_RANGE | grep -E '^test_')

if [ -n $REQUIRES_TEST ] && ![ -n $CONTAINS_TEST ]; then
echo "Test required for feature/bugfix."
exit 1
fi
1 change: 1 addition & 0 deletions CHANGES/7437.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Require tests for feature/bugfix

0 comments on commit efc78f2

Please sign in to comment.