-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
58 lines (52 loc) · 1.85 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
language: php
php:
# aliased to a recent 7.x version
- 7.3
# faster builds on new travis setup not using sudo
sudo: false
addons:
hosts:
- hike.devel
notifications:
email: false
cache:
directories:
- $HOME/.composer/cache
services:
- mysql
# before_install:
# - mysql -e 'create database IF NOT EXISTS `hike-app-test`;' -u root
# - mysql -e "CREATE USER 'test'@'localhost' IDENTIFIED BY 'secret';" -u root
# - mysql -e "GRANT ALL PRIVILEGES ON * . * TO 'test'@'localhost';" -u root
# - mysql -e "FLUSH PRIVILEGES;"
# - mysql -e "USE mysql;\nUPDATE user SET password=PASSWORD('password') WHERE user='root';\nFLUSH PRIVILEGES;\n" -u root
install:
- mysql -e 'create database test;'
- cp config/db.dist.php config/db.php
- cp config/email.dist.php config/email.php
- cp config/keys.dist.php config/keys.php
- travis_retry composer self-update && composer --version
# - travis_retry composer global require "fxp/composer-asset-plugin:~1.1.1"
- composer global require "fxp/composer-asset-plugin"
- composer install
- php yii migrate/up --migrationPath=@yii/rbac/migrations --interactive=0
- php yii migrate/up --migrationPath=@vendor/dektrium/yii2-user/migrations --interactive=0
- php yii migrate/up --interactive=0
- travis_retry composer install --no-interaction
# install php extensions
- |
if (php --version | grep -i HipHop > /dev/null); then
echo "Skipping imagick and gmagick tests on HHVM"
else
pear config-set preferred_state beta
printf "\n" | pecl install imagick
# gmagick is not installed on travis currently
#printf "\n" | pecl install gmagick
fi
# setup application:
- |
sed -i "s/'cookieValidationKey' => ''/'cookieValidationKey' => 'testkey'/" config/test.php
script:
- |
php -S localhost:8080 -t web > /dev/null 2>&1 &
vendor/bin/codecept run functional