-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
41 lines (34 loc) · 1.17 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
# 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:
# aliased to a recent 7.0 version
- php: '7.0'
# aliased to a recent 7.1 version
- php: '7.1'
env: SNIFF=1
# aliased to a recent 7.2 version
- php: '7.2'
# php nightly
- php: 'nightly'
allow_failures:
- php: nightly
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 [[ "$SNIFF" == "1" ]]; then vendor/bin/phpcs src/lib/ --standard=PSR2; fi