@@ -3,13 +3,18 @@ php: 7.2
3
3
cache :
4
4
directories :
5
5
- " $HOME/.composer/cache/files"
6
+
7
+ services :
8
+ - mysql
9
+
6
10
env :
7
11
global :
8
12
- PROJECT_NAME=contentacms
9
13
- PROJECT_BASE_PATH=$HOME/$PROJECT_NAME
10
14
- PROJECT_RELEASE_BRANCH=${PROJECT_RELEASE_BRANCH:-8.x-3.x}
11
15
- SIMPLETEST_BASE_URL=http://127.0.0.1:8888
12
- - SIMPLETEST_DB=sqlite://tmp/site.sqlite
16
+ - DB_NAME=drupal8_${TRAVIS_BUILD_NUMBER}
17
+ -
SIMPLETEST_DB=mysql://[email protected] /drupal8_${TRAVIS_BUILD_NUMBER}
13
18
14
19
branches :
15
20
only :
@@ -24,18 +29,25 @@ jobs:
24
29
- echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
25
30
# Fix failing tests due to email sending.
26
31
- echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
32
+ - composer selfupdate
27
33
- mkdir $PROJECT_BASE_PATH
34
+ - mysql -e "CREATE DATABASE IF NOT EXISTS $DB_NAME;"
28
35
install : composer run-script install-contenta $PROJECT_BASE_PATH --timeout=0
29
36
before_script :
30
37
# Start Contenta CMS Local Server
31
38
- composer run-script start-contenta $PROJECT_BASE_PATH --timeout=0 &
32
39
- until curl -sS $SIMPLETEST_BASE_URL; do sleep 1; done > /dev/null
33
40
- echo "Connected to the test server at ${SIMPLETEST_BASE_URL}"
34
41
script : composer run-script ci:helper run_functional_tests "$PROJECT_BASE_PATH" --timeout=0
35
- after_script : killall php
42
+ after_script :
43
+ - mysql -e "DROP DATABASE $DB_NAME;"
44
+ - mysql -e "SHOW DATABASES;"
45
+ - killall php
36
46
37
47
-
38
48
stage : release
49
+ before_install :
50
+ - composer selfupdate
39
51
install : composer run-script install-contenta $PROJECT_BASE_PATH --timeout=0
40
52
before_script : skip
41
53
script : skip
0 commit comments