-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
37 lines (30 loc) · 1.06 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
# 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: '7.2'
env: SNIFF=1
- php: '7.3'
- php: 'nightly'
allow_failures:
- php: nightly
before_install:
# Install PHP CodeSniffer.
- if [[ "$SNIFF" == "1" ]]; then composer self-update; fi
- if [[ "$SNIFF" == "1" ]]; then COMPOSER_MEMORY_LIMIT=-1 travis_retry composer install --prefer-dist --no-interaction; 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 . --standard=./phpcs.xml.dist --extensions=php,lib,inc; fi
# Run PHPStan
- if [[ "$SNIFF" == "1" ]]; then vendor/bin/phpstan analyse .; fi