forked from swoft-cloud/swoft-component
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
85 lines (81 loc) · 2.91 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
dist: xenial
language: php
php:
- 7.1
- 7.2
- 7.3
- 7.4
services:
- mysql
- redis
before_install:
- sudo mysql -e "use mysql; update user set authentication_string=PASSWORD('swoft123456') where User='root'; update user set plugin='mysql_native_password';FLUSH PRIVILEGES;"
- sudo mysql_upgrade -u root -pswoft123456
- sudo service mysql restart
- mysql -uroot -pswoft123456 -e 'CREATE DATABASE IF NOT EXISTS test;
USE test;
CREATE TABLE `user` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(20) CHARACTER SET utf8mb4 NOT NULL DEFAULT "",
`age` int(11) NOT NULL DEFAULT '0',
`password` varchar(100) CHARACTER SET utf8mb4 NOT NULL DEFAULT "",
`user_desc` varchar(120) CHARACTER SET utf8mb4 NOT NULL DEFAULT "",
`add` int(3) DEFAULT NULL,
`hahh` int(11) DEFAULT '1',
`test_json` json DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE `count` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) DEFAULT NULL,
`create_time` int(11) DEFAULT NULL,
`attributes` varchar(244) DEFAULT NULL,
`update_time` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;
CREATE DATABASE IF NOT EXISTS test2;
USE test2;
CREATE TABLE `user` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(20) CHARACTER SET utf8mb4 NOT NULL DEFAULT "",
`age` int(11) NOT NULL DEFAULT '0',
`password` varchar(100) CHARACTER SET utf8mb4 NOT NULL DEFAULT "",
`user_desc` varchar(120) CHARACTER SET utf8mb4 NOT NULL DEFAULT "",
`add` int(3) DEFAULT NULL,
`hahh` int(11) DEFAULT '1',
`test_json` json DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;'
install:
- echo 'no' | pecl install -f redis
- wget https://github.com/swoole/swoole-src/archive/v4.4.18.tar.gz -O swoole.tar.gz && mkdir -p swoole && tar -xf swoole.tar.gz -C swoole --strip-components=1 && rm swoole.tar.gz && cd swoole && phpize && ./configure && make -j$(nproc) && make install && cd -
- echo "extension = swoole.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
before_script:
- composer config -g process-timeout 900 && composer update
- phpenv config-rm xdebug.ini
script:
- composer component
- composer aop
- composer annotation
- composer bean
- composer swoft-config
- composer connection-pool
- composer console
- composer event
- composer framework
- composer http-message
- composer http-server
- composer i18n
- composer log
- composer proxy
- composer redis
- composer db
- composer rpc
- composer rpc-client
- composer rpc-server
- composer stdlib
- composer task
- composer tcp
- composer tcp-server
- composer validator
- composer websocket-server