forked from noetix/Simple-ORM
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.travis.yml
31 lines (25 loc) · 940 Bytes
/
.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
language: php
php:
- 5.6
services:
- mysql
before_install:
- mysql -e 'CREATE DATABASE IF NOT EXISTS test;'
- mysql -e 'CREATE TABLE `test`.`blog` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(100) NOT NULL, `body` text, `reads` int(11) NOT NULL DEFAULT '0', `rate` float(6,2) DEFAULT '0.00', `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; '
- mysql -u root -e "CREATE USER 'test'@'localhost' IDENTIFIED BY 'test';"
- mysql -u root -e "GRANT ALL ON test.* TO 'test'@'localhost';"
before_script:
- composer self-update
- composer install --no-interaction
- composer dumpautoload
- export DB_USER=test
- export DB_PASS=test
- export DB_HOST=localhost
script:
- vendor/bin/phpunit -c phpunit.xml --coverage-text
env:
global:
- DB_HOST=localhost
- DB_USER=test
- DB_PASS=test
- DB_NAME=test