-
Notifications
You must be signed in to change notification settings - Fork 39
/
.travis.yml
54 lines (54 loc) · 1.58 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
language: php
php:
- 7.4
- 8.0
- 8.1
services:
- mysql
matrix:
allow_failures:
- php: 8.0
- php: 8.1
env:
global:
- XDEBUG_MODE=coverage
- secure: "QKyI/QO6H6pFE04Iz/4IcSuttMdY3o85mD2BTNV2Y2SeSPxLfuukqPrxjANrTc4GfI1v7/bZM43uMl3aRa76+HRZ83ZsXR8uv1VZUgNHYuoq7jdZb18BitM36h0LbHzTbYetJLiYg7l3mnbAezTXPXHfpNIWvZcuyZzatyF/lng="
before_install:
# Prefer IPv4 over IPv6
- sudo sh -c "echo 'precedence ::ffff:0:0/96 100' >> /etc/gai.conf"
install:
# Composer
- composer self-update
- composer install -n --prefer-source
# Database
- mysql -e 'CREATE DATABASE bluz;'
before_script:
# Database
- mysql -uroot bluz < tests/_data/dump.sql
# Directories
- mkdir .reports
- chmod a+w ./tests/cache
- chmod a+w ./tests/_output
script:
# Check code style
- php vendor/bin/phpcs ./src --standard=PSR12 --encoding=utf-8
# Complexity of code
- php vendor/bin/phploc ./src
# Run Codeception tests
- php vendor/bin/codecept run --coverage --coverage-xml
after_success:
# Upload coverage report
- php vendor/bin/php-coveralls -v
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover tests/_output/coverage.xml
# Generate documentation
- bash .travis.sh
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