Skip to content

Commit e81d40f

Browse files
authored
Merge pull request #2413 from NoelDeMartin/MOBILE-3294
Mobile 3294
2 parents 9803794 + 7795e49 commit e81d40f

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

.travis.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ jobs:
4343
os: linux
4444
script: npm run build --bailOnLintError true --typeCheckOnLint true
4545
- stage: mirror
46-
if: branch IN (master, integration, desktop) AND repo = moodlehq/moodleapp
46+
if: branch IN (master, integration, desktop) AND repo = moodlehq/moodleapp AND type != cron
4747
os: linux
4848
script: scripts/mirror.sh
4949
- stage: prepare
50-
if: branch =~ /(master|^integration)$/ AND env(PREPARE) IS NOT blank AND env(PREPARE) = 1
50+
if: branch =~ /(master|^integration)$/ AND env(PREPARE) IS NOT blank AND env(PREPARE) = 1 AND type != cron
5151
os: linux
5252
script: scripts/aot.sh
5353
- stage: build
@@ -109,17 +109,17 @@ jobs:
109109
name: "End to end tests (mod_forum, mod_messages and mod_comments)"
110110
services:
111111
- docker
112-
if: env(TRAVIS_EVENT_TYPE) = cron
112+
if: type = cron
113113
script: scripts/test_e2e.sh "@app&&@mod_forum" "@app&&@mod_messages" "@app&&@mod_comments"
114114
- stage: test
115115
name: "End to end tests (mod_data, mod_survey, mod_course, core_course and mod_courses)"
116116
services:
117117
- docker
118-
if: env(TRAVIS_EVENT_TYPE) = cron
118+
if: type = cron
119119
script: scripts/test_e2e.sh "@app&&@mod_data" "@app&&@mod_survey" "@app&&@mod_course" "@app&&@core_course" "@app&&@mod_courses"
120120
- stage: test
121121
name: "End to end tests (others)"
122122
services:
123123
- docker
124-
if: env(TRAVIS_EVENT_TYPE) = cron
124+
if: type = cron
125125
script: scripts/test_e2e.sh "@app&&~@mod_forum&&~@mod_messages&&~@mod_comments&&~@mod_data&&~@mod_survey&&~@mod_course&&~@core_course&&~@mod_courses"

scripts/test_e2e.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,16 @@ $dockercompose pull
4141
$dockercompose up -d
4242
$dockerscripts/moodle-docker-wait-for-db
4343
$dockerscripts/moodle-docker-wait-for-app
44-
$dockercompose exec -T webserver php admin/tool/behat/cli/init.php
44+
45+
$dockercompose exec -T webserver sh -c "php admin/tool/behat/cli/init.php"
46+
notify_on_error_exit "e2e failed initializing behat"
4547

4648
# Run tests
4749
for tags in "$@"
4850
do
4951
print_title "Running e2e tests ($tags)"
5052

51-
$dockercompose exec -T webserver php admin/tool/behat/cli/run.php --tags="$tags"
53+
$dockercompose exec -T webserver sh -c "php admin/tool/behat/cli/run.php --tags=\"$tags\""
5254
notify_on_error_exit "e2e failed on $tags"
5355
done
5456

0 commit comments

Comments
 (0)