-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
.travis.yml
81 lines (73 loc) · 2.7 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Travis CI (MIT License) configuration file
# @link https://travis-ci.org/
dist: trusty
cache:
directories:
# Cache directory for older Composer versions.
- $HOME/.composer/cache/files
# Cache directory for more recent Composer versions.
- $HOME/.cache/composer/files
# Declare project language.
# @link https://docs.travis-ci.com/user/languages/php/
language: php
# Declare versions of PHP to use. Use one decimal max.
matrix:
fast_finish: true
include:
# aliased to 5.2.17
- php: '5.2'
dist: precise
env: LTPHPFIVEFOUR=1
# aliased to 5.3.29
- php: '5.3'
dist: precise
env: LTPHPFIVEFOUR=1
- php: '5.4'
env: GTEPHPFIVEFOUR=1
- php: '5.5'
env: GTEPHPFIVEFOUR=1
- php: '5.6'
env: GTEPHPFIVEFOUR=1
- php: '7.0'
env: GTEPHPFIVEFOUR=1
- php: '7.1'
env: GTEPHPFIVEFOUR=1
- php: '7.2'
env: GTEPHPFIVEFOUR=1
- php: '7.3'
env: GTEPHPFIVEFOUR=1 SNIFF=1
- php: '7.4snapshot'
env: GTEPHPFIVEFOUR=1
- php: 'nightly'
env: GTEPHPFIVEFOUR=1
allow_failures:
- php: '7.4snapshot'
- php: 'nightly'
# Use this to prepare your build for testing.
# Failures in this section will result in build status 'errored'.
before_install:
# Speed up build time by disabling Xdebug.
# https://johnblackbourn.com/reducing-travis-ci-build-times-for-wordpress-projects/
- phpenv config-rm xdebug.ini || echo 'No xdebug config.'
# Install PHP_CodeSniffer and external standards.
- if [[ "$SNIFF" == "1" ]]; then composer install --dev --no-suggest; fi
# Install JSCS: JavaScript Code Style checker
# @link http://jscs.info/
- if [[ "$SNIFF" == "1" ]]; then npm install -g jscs; fi
# Install JSHint, a JavaScript Code Quality Tool
# @link http://jshint.com/docs/
- if [[ "$SNIFF" == "1" ]]; then npm install -g jshint; fi
# Run test script commands.
# All commands must exit with code 0 on success. Anything else is considered failure.
script:
# Search for PHP syntax errors.
- if [[ "$GTEPHPFIVEFOUR" == "1" ]]; then find -L . -path ./vendor -prune -o -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l; fi
- if [[ "$LTPHPFIVEFOUR" == "1" ]]; then find -L . -path ./vendor -prune -o \( -name "*php54.php" \) -prune -o -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l; fi
# Run JSHint.
- if [[ "$SNIFF" == "1" ]]; then jshint .; fi
# Run through JavaScript Code Style checker.
- if [[ "$SNIFF" == "1" ]]; then jscs .; fi
# Check code style against custom ruleset.
- if [[ "$SNIFF" == "1" ]]; then $(pwd)/vendor/bin/phpcs --runtime-set ignore_warnings_on_exit 1; fi
# Test the build script.
- php -f "./bin/autogen-static-sheets.php" verbose=1