-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
64 lines (55 loc) · 1.94 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
language: php
services:
- mysql
env:
global:
- SIMPLETEST_DB="mysql://drupal:[email protected]/drupal"
- DTT_BASE_URL=http://127.0.0.1:8888
- PUBLIC_DIR=web/sites/default/files
- PRIVATE_DIR=/tmp/shared/private
- TMP_DIR=/tmp/shared/tmp
- SHEPHERD_INSTALL_PROFILE=shepherd
- SITE_TITLE=Shepherd
- SITE_ADMIN_USERNAME=admin
- SITE_ADMIN_PASSWORD=password
- DATABASE_USER=drupal
php:
- 7.4
cache:
directories:
- $HOME/.composer/cache
matrix:
fast_finish: true
mysql:
database: drupal
username: root
encoding: utf8
before_install:
- phpenv config-rm xdebug.ini || true
- mysql -u root -e 'CREATE DATABASE IF NOT EXISTS drupal CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci'
- mysql -u root -e "CREATE USER 'drupal'@'127.0.0.1' IDENTIFIED BY 'password';"
- mysql -u root -e "GRANT ALL ON drupal.* TO 'drupal'@'127.0.0.1';"
- sed -i '1i export PATH="$HOME/.composer/vendor/bin:$PATH"' $HOME/.bashrc
- source $HOME/.bashrc
- composer self-update --1
- export BROWSERTEST_OUTPUT_DIRECTORY="$(pwd)/web/sites/simpletest/browser_output"
- export SHEPHERD_ROOT=$(pwd)
# For whatever reason, when this runs during robo build we get permission denied.
- mkdir -p $PUBLIC_DIR $BROWSERTEST_OUTPUT_DIRECTORY
# Move settings into place for CI.
- mv web/sites/default/ci.settings.php web/sites/default/settings.local.php
install:
- composer install
- (php -S localhost:8888 -t $(pwd)/web/ &) >> /dev/null 2>&1
- ./bin/robo build
# Enable test modules.
- ./bin/drush en -y shp_cache_backend_test
script:
- ./bin/robo lint:php
- ./bin/phpunit --stop-on-failure --testsuite unit
- ./bin/phpunit --stop-on-failure --testsuite kernel
- ./bin/phpunit --stop-on-failure --testsuite functional
- ./bin/phpunit --stop-on-failure --testsuite functionaljs
- ./bin/phpunit --stop-on-failure --testsuite functionalclean