Skip to content

Commit

Permalink
Run E2E tests if go.mod changes
Browse files Browse the repository at this point in the history
This mirrors the behavior before the removal of the vendor/ directory.

A new file is added, .ci/e2e_triggers to keep a list of regular
expressions that will be used to decide if E2E should run or not for a
given commit.

Signed-off-by: Marcelo E. Magallon <[email protected]>
  • Loading branch information
Marcelo E. Magallon committed Oct 22, 2019
1 parent 3dde089 commit 82ea27d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .ci/e2e_triggers
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
^\.circleci/
^e2e/
^go\.mod$
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ x-run:
case "${TARGET_BRANCH}" in
master|release-*)
if git --no-pager diff --name-only HEAD "origin/${TARGET_BRANCH}" |
grep -q -E '^(e2e|vendor|\.circleci)/'
grep -q -E -f .ci/e2e_triggers
then
# There are changes in .circleci, e2e or vendor
# directories, require e2e
# There are changes in critical components, require
# e2e
require_e2e=true
fi
;;
Expand All @@ -99,7 +99,7 @@ x-run:
esac
if ! "$require_e2e" ; then
echo "No changes in e2e or vendor directories, skipping tests"
echo "No changes in critical components, skipping tests"
circleci step halt
fi
Expand Down

0 comments on commit 82ea27d

Please sign in to comment.