-
Notifications
You must be signed in to change notification settings - Fork 279
/
.travis.yml
92 lines (78 loc) · 2.63 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
language: php
dist: trusty
sudo: false
php:
- 7.1
env:
- APP_STATUS=travis
services:
- redis-server
- mysql
- nginx
matrix:
fast_finish: true
branches:
only:
- master
- travis
cache:
apt: true
directories:
- $HOME/.composer/cache/files
before_install:
- ls /home/travis/
- ls ~
before_script:
- sudo mysql -e "use mysql; update user set authentication_string=PASSWORD('Masterlab123@#') where User='root'; update user set plugin='mysql_native_password';FLUSH PRIVILEGES;"
- sudo mysql_upgrade -u root -pMasterlab123@#
- sudo service mysql restart
- sudo mysql -e "create database IF NOT EXISTS masterlab_ci default charset utf8 COLLATE utf8_general_ci ;" -uroot -pMasterlab123@#
- sudo mysql -e "SET sql_mode = 'IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';use masterlab_ci;source $TRAVIS_BUILD_DIR/app/public/install/data/main.sql;" -uroot -pMasterlab123@#
- sudo mysql -e "SET sql_mode = 'IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';use masterlab_ci;source $TRAVIS_BUILD_DIR/app/public/install/data/fulltext-5.7.sql;" -uroot -pMasterlab123@#
- sudo mysql -e "set global sql_mode='NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';show variables like '%ngram%';" -uroot -pMasterlab123@#
- git clone https://github.com/phpredis/phpredis.git
- cd phpredis/
- phpize
- ./configure
- make
- make install
- phpenv config-add $TRAVIS_BUILD_DIR/php.ini
script:
- git clone https://github.com/gopeak/hornet-framework.git /home/travis/build/gopeak/hornet-framework
- cd $TRAVIS_BUILD_DIR
- echo $TRAVIS_BUILD_DIR
- git checkout travis
- git pull origin travis
- cp -f env.ini-travis env.ini
- composer update
- ls
- chmod +x $TRAVIS_BUILD_DIR/travis/install-nginx.sh
- $TRAVIS_BUILD_DIR/travis/install-nginx.sh
- chown -R $(whoami):$(whoami) $TRAVIS_BUILD_DIR/app/storage
- chmod +x $TRAVIS_BUILD_DIR/storage
- curl "http://masterlab.ci:8888/framework/feature/getPhpIni?data_type=json"
- cat /tmp/error.log
- touch $TRAVIS_BUILD_DIR/storage/tmp/10000.png
- php app/public/test_mysql.php
- cd app/test
- sudo chmod +x $TRAVIS_BUILD_DIR
- phpunit
#- cat /tmp/error.log
after_success:
- export CODECOV_TOKEN="c45b03fd-fc8c-401a-81d8-71f81990c0e8"
- bash <(curl -s https://codecov.io/bash)
notifications:
email:
- 121642038@qq.com
addons:
#ssh_known_hosts: 47.244.62.11
hosts:
- masterlab.ci
apt:
sources:
- mysql-5.7-trusty
packages:
- mysql-server
- mysql-client
- nginx
- realpath