File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,19 @@ cd $(dirname $0)/../..
10
10
source scripts/ci/sources/mode.sh
11
11
source scripts/ci/sources/tunnel.sh
12
12
13
+ # Get commit diff
14
+ if [ " $TRAVIS_PULL_REQUEST " = " false" ]; then
15
+ fileDiff=$( git diff --name-only $TRAVIS_COMMIT_RANGE )
16
+ else
17
+ fileDiff=$( git diff --name-only $TRAVIS_BRANCH ...HEAD)
18
+ fi
19
+
20
+ # Check if tests can be skipped
21
+ if [[ ${fileDiff} =~ ^(.* \. md\s * )* $ ]] && (is_e2e || is_unit); then
22
+ echo " Skipping e2e and unit tests since only markdown files changed"
23
+ exit 0
24
+ fi
25
+
13
26
start_tunnel
14
27
wait_for_tunnel
15
28
@@ -23,7 +36,7 @@ elif is_payload; then
23
36
$( npm bin) /gulp ci:payload
24
37
elif is_closure_compiler; then
25
38
./scripts/closure-compiler/build-devapp-bundle.sh
26
- else
39
+ elif is_unit ; then
27
40
$( npm bin) /gulp ci:test
28
41
fi
29
42
Original file line number Diff line number Diff line change @@ -19,4 +19,8 @@ is_closure_compiler() {
19
19
20
20
is_payload () {
21
21
[[ " $MODE " = payload ]]
22
- }
22
+ }
23
+
24
+ is_unit () {
25
+ [[ " $MODE " = saucelabs_required || " $MODE " = browserstack_required ]]
26
+ }
You can’t perform that action at this time.
0 commit comments