-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
58 lines (49 loc) · 1.9 KB
/
.travis.yml
File metadata and controls
58 lines (49 loc) · 1.9 KB
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
# Travis CI config for the WordPoints developer tools.
language: php
dist: trusty
# Use the new infrastructure.
sudo: false
addons:
apt:
packages:
# Needed for `xmllint`.
- libxml2-utils
env:
global:
- RUN_PHPCS=1
matrix:
include:
- php: 7.3
- php: 7.2
- php: 7.1
- php: 7.0
- php: 5.6
- php: nightly
allow_failures:
- php: nightly
before_script:
- npm install -g jshint
- gem install travis-lint
- source .wordpoints-dev-lib-config.sh
- export DEV_LIB_PATH=none
- source bin/env.sh
- source bin/functions.sh
- wordpoints-dev-lib-config
- source travis/commands.sh
- if [[ $RUN_PHPCS == 1 ]]; then mkdir -p $WPCS_DIR && git clone --depth 1 https://github.com/${WPCS_GITHUB_SRC}.git -b develop $WPCS_DIR; fi
- if [[ $RUN_PHPCS == 1 ]]; then mkdir -p $PHPCS_DIR && git clone --depth 1 https://github.com/squizlabs/PHP_CodeSniffer.git -b master $PHPCS_DIR; fi
- if [[ $RUN_PHPCS == 1 ]]; then $PHPCS_DIR/bin/phpcs --config-set installed_paths "$WPCS_DIR",phpcs; fi
- export RUN_PHPCS_TESTS=$(if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then echo 1; else echo 0; fi);
- if [[ $RUN_PHPCS_TESTS == 1 ]]; then export PATH=`composer config --list --global | grep '\[home\]' | { read a; echo "${a#* }/vendor/bin:$PATH"; }`; fi
- if [[ $RUN_PHPCS_TESTS == 1 ]]; then composer global require "phpunit/phpunit=^5.7.15"; fi
script:
- wpdl-codesniff-xmllint
- wpdl-codesniff-bash
- wpdl-codesniff-jshint
- wpdl-codesniff-strings
- wpdl-codesniff-dittography
- if [[ $RUN_PHPCS == 1 ]]; then CODESNIFF_PATH_PHP_PHPCS=("${CODESNIFF_PATH_PHP[@]}" '!' -path "./phpcs/WordPoints/Tests/*"); wpdl-codesniff-phpcs; fi
- find ./travis -name '*.yml' -exec travis-lint {} \;
- wpdl-codesniff-php-syntax
- if [[ $RUN_PHPCS_TESTS == 1 ]]; then phpunit --bootstrap="$PHPCS_DIR/tests/bootstrap.php" --filter WordPoints "$PHPCS_DIR/tests/AllTests.php"; fi
# EOF