@@ -11,6 +11,31 @@ mv CumulusCI/.git .
11
11
# Run the CumulusCI Unit Tests
12
12
nosetests --with-tap --tap-stream --with-coverage --cover-package=cumulusci
13
13
14
+ # If the last commit message contains [skip CumulusCI-Test], skip running any test flows
15
+ git log -n 1 | grep ' \[skip CumulusCI-Test\]' > /dev/null
16
+ exit_status=$?
17
+ if [ " $exit_status " == " 0" ]; then
18
+ echo " Found [skip CumulusCI-Test] in the commit message, skipping cci flow test runs"
19
+ coveralls
20
+ exit
21
+
22
+ fi
23
+
24
+ # For feature branches, skip running the CumulusCI-Test flows if there is not an open PR unless the last commit message contains [run CumulusCI-Test]
25
+ if [ " $HEROKU_TEST_RUN_BRANCH " != " master" ] && \
26
+ [[ " $HEROKU_TEST_RUN_BRANCH " == feature/* ]]; then
27
+ echo " Checking for open pull request to determine next testing steps"
28
+ pr=` python scripts/has_open_pr.py " $HEROKU_TEST_RUN_BRANCH " `
29
+ git log -n 1 | grep ' \[run CumulusCI-Test\]' > /dev/null
30
+ exit_status=$?
31
+ if [ " $pr " == " " ] && [ " $exit_status " != " 0" ]; then
32
+ # If there is not an open PR, don't run the CumulusCI-Test flows
33
+ coveralls
34
+ exit
35
+ fi
36
+ fi
37
+
38
+
14
39
# Clone the CumulusCI-Test repo to run test builds against it with cci
15
40
echo " ------------------------------------------"
16
41
echo " Running test builds against CumulusCI-Test"
@@ -19,7 +44,8 @@ echo ""
19
44
echo " Cloning https://github.com/SalesforceFoundation/CumulusCI-Test"
20
45
git clone https://github.com/SalesforceFoundation/CumulusCI-Test
21
46
cd CumulusCI-Test
22
- if [ $HEROKU_TEST_RUN_BRANCH == " master" ]; then
47
+ if [ " $HEROKU_TEST_RUN_BRANCH " == " master" ] || \
48
+ [[ " $HEROKU_TEST_RUN_BRANCH " == feature/* ]] ; then
23
49
echo " 1...4"
24
50
coverage run --append --source=../cumulusci ` which cci` flow run ci_feature --org scratch --delete-org | tee cci.log
25
51
exit_status=$?
@@ -51,15 +77,6 @@ if [ $HEROKU_TEST_RUN_BRANCH == "master" ]; then
51
77
echo " not ok 4 - Failed ci_beta: ` tail -1 cci.log` "
52
78
fi
53
79
54
- else
55
- echo " 1...1"
56
- coverage run --append --source=../cumulusci ` which cci` flow run ci_feature --org scratch --delete-org
57
- exit_status=$?
58
- if [ " $exit_status " == " 0" ]; then
59
- echo " ok 1 - Successfully ran ci_feature"
60
- else
61
- echo " not ok 1 - Failed ci_feature: ` tail -1 cci.log` "
62
- fi
63
80
fi
64
81
65
82
# Combine the CumulusCI-Test test coverage with the nosetest coverage
0 commit comments