forked from Yoast/duplicate-post
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (46 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
42
43
44
45
46
47
48
49
50
51
52
53
54
language: php
branches:
only:
- master
- develop
- /^release\/*/
- /^hotfix\/\d+\.\d+(\.\d+)?(-\S*)?$/
- /^feature\/*/
# Also build tags like 1.1.1 or 1.1 for deployment.
- /^\d+\.\d+(\.\d+)?(-\S*)?$/
cache:
directories:
- .cache
php:
- '5.6'
- '7.0'
- '7.1'
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- "nightly"
matrix:
include:
# Arbitrary PHP version to run the sniffs against.
- php: '7.4'
env: SNIFF=1 PHPUNIT=1
allow_failures:
- php: "nightly"
before_install:
- if [[ "$SNIFF" == "1" || "$PHPUNIT" == "1" ]]; then composer install; fi
before_script:
- export -f travis_fold
- export -f travis_time_start
- export -f travis_time_finish
script:
- find -L . ./compat/ ./src/ \( -path ./vendor -o -path ./node_modules \) -prune -o -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l
- if [[ "$SNIFF" == "1" ]]; then composer check-cs; fi
- if [[ "$SNIFF" == "1" ]]; then composer check-vip; fi
# PHP Unit Tests
- |
if [[ "$PHPUNIT" == "1" ]]; then
travis_fold start "PHP.tests" && travis_time_start
composer test
travis_time_finish && travis_fold end "PHP.tests"
fi