forked from bluzphp/skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
42 lines (42 loc) · 1.41 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
language: php
php:
- 5.6
- 7.0
install:
# ImageMagick
#- printf "\n" | pecl install imagick
# Composer
- composer self-update
- COMPOSER_ROOT_VERSION=dev-master composer install
# Database
- mysql -e 'CREATE DATABASE bluz;'
# Newman
- npm install -g newman@1
before_script:
# Database
- mysql -uroot bluz < structure.ddl
- mysql -uroot bluz < dump.sql
- mysql -uroot bluz < tests/dump.sql
script:
- mkdir .reports
# Code style
- php vendor/bin/phpcs ./application --standard=PSR1,PSR2 --encoding=utf-8 --ignore=./application/_loader.php
# PHPUnit tests
- php vendor/bin/phpunit --configuration ./phpunit.xml.dist --coverage-clover=.reports/clover.xml
# WebServer run
- nohup bash -c "php -S 127.0.0.1:8000 -t ./public/ ./public/routing.php 2>&1 &" && sleep 1; cat nohup.out
# Newman run
- newman -c tests/postman/collection.json -e tests/postman/environment.json -x
after_script:
- php vendor/bin/coveralls -v
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover .reports/clover.xml
notifications:
email: false
webhooks:
urls:
- https://webhooks.gitter.im/e/b84e6a583d6eea87d0eb
- https://webhooks.gitter.im/e/c4fa557829c5bd992271
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: false # default: false