-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
33 lines (27 loc) · 1.1 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
# Travis CI (MIT License) configuration file
# @link https://travis-ci.org/
# Use new container based environment
sudo: false
# Declare project language.
# @link http://about.travis-ci.org/docs/user/languages/php/
language: php
# Declare versions of PHP to use. Use one decimal max.
# @link http://docs.travis-ci.com/user/build-configuration/
matrix:
fast_finish: true
include:
- php: '5.6'
before_install:
# Install PHP CodeSniffer.
- if [[ "$SNIFF" == "1" ]]; then composer self-update; fi
- if [[ "$SNIFF" == "1" ]]; then composer require squizlabs/php_codesniffer:dev-master; fi
- if [[ "$SNIFF" == "1" ]]; then composer install; fi
- phpenv rehash
script:
# Search for PHP syntax errors.
- find -L . -path ./vendor -prune -o -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l
# Run PHPCS.
# If the custom ruleset is named `.phpcs.xml`, `phpcs.xml`, `.phpcs.xml.dist` or `phpcs.xml.dist`
# and, like the travis script, is in the root of the project, you can leave
# out the `--standard=` part of the command.
- if [[ "$SNIFF" == "1" ]]; then vendor/bin/phpcs . --standard=PSR2; fi