forked from baserproject/basercms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
59 lines (50 loc) · 1.56 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
language: php
php:
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4
- hhvm
env:
- DB=mysql
matrix:
include:
- php: 5.6
env: DB=postgres
- php: 5.6
env: DB=sqlite
allow_failures:
- php: hhvm
dist: trusty
sudo: false
cache:
directories:
- vendors
- $HOME/.composer/cache
before_script:
- if [[ ${TRAVIS_PHP_VERSION:0:3} =~ ^7\.[234]$ ]] ; then pear config-set preferred_state snapshot && yes "" | pecl install mcrypt ; fi;
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then phpenv config-add travis.php.ini; fi;
- |
bash -c "if [ '$DB' == 'mysql' ]; then
mysql -u root -e \"CREATE DATABASE basercms CHARACTER SET utf8;\";
mysql -u root -e \"GRANT ALL PRIVILEGES ON basercms.* TO basercms@localhost IDENTIFIED BY 'basercms';\";
fi;"
- |
bash -c "if [ '$DB' == 'postgres' ]; then
psql -U postgres -c \"CREATE USER basercms WITH PASSWORD 'basercms';\";
psql -U postgres -c \"CREATE DATABASE basercms OWNER basercms ENCODING='utf8'\";
fi;"
- composer self-update;
- if [ -n "$GITHUB_TOKEN" ]; then composer config github-oauth.github.com ${GITHUB_TOKEN}; fi;
- composer install;
- cd app
- php ./Console/cake.php bc_manager checkenv
- php ./Console/cake.php bc_manager install "https://localhost" "$DB" "admin" "basercms" "[email protected]" --host "localhost" --database "basercms" --login "basercms" --password "basercms" --prefix "mysite_" --data "bc_sample.default"
script:
- php ./Console/cake.php baser_test baser BcAll
notifications:
email: false