-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
48 lines (40 loc) · 947 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
dist: trusty
os: linux
language: php
notifications:
email:
recipients:
on_failure: always
on_success: never
branches:
only:
- master
- dev
- fix
jobs:
include:
- env: TRAVISCI=phpunit
- env: TRAVISCI=phpcs
before-install:
- composer self-update --2
before_script:
- |
if [[ "$TRAVISCI" == "phpunit" ]] ; then
composer require phpunit/phpunit 7.*
fi
- |
if [[ "$TRAVISCI" == "phpcs" ]] ; then
composer require squizlabs/php_codesniffer
composer require phpcompatibility/php-compatibility
vendor/bin/phpcs --config-set installed_paths vendor/phpcompatibility/php-compatibility
fi
script:
- |
if [[ "$TRAVISCI" == "phpunit" ]] ; then
vendor/bin/phpunit --configuration tests/phpunit.xml --coverage-text
fi
- |
if [[ "$TRAVISCI" == "phpcs" ]] ; then
vendor/bin/phpcs --standard=tests/.phpcs.xml
fi