-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.travis.yml
26 lines (21 loc) · 887 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
language: php
php:
- '5.6'
- '7.0'
- nightly
before_install:
- wget http://cs.sensiolabs.org/get/php-cs-fixer.phar
env:
- DB=mysql
- DB=sqlite
before_script:
- chmod -R 777 tests/server/data/
- mysql -u root -e "DROP DATABASE IF EXISTS wmp_test; CREATE DATABASE wmp_test DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;"
- mysql -u root -e "CREATE USER 'wmp_test'@'localhost' IDENTIFIED BY 'wmp_test';"
- mysql -u root -e "GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, REFERENCES, DROP ON wmp_test.* TO wmp_test@'localhost';"
- sed 's/`wmp`/`wmp_test`/g' server/configuration/create-mysql.sql | mysql -u root
services:
- mysql
script:
- (cd tests ; phpunit -c phpunit.xml)
- output=$(php php-cs-fixer.phar fix -v --dry-run . --fixers=-psr0); if [[ $output ]]; then while read -r line; do echo -e "\e[00;31m$line\e[00m"; done <<< "$output"; false; fi;