This repository was archived by the owner on Feb 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.travis.yml
More file actions
100 lines (90 loc) · 2.73 KB
/
.travis.yml
File metadata and controls
100 lines (90 loc) · 2.73 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
sudo: false
language: php
php:
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
env:
- WP_VERSION=latest WP_MULTISITE=0
matrix:
include:
- php: 7.2
env: WP_TRAVISCI=travis:phpvalidate
- php: 7.2
env: WP_TRAVISCI=travis:codecoverage
- php: 7.2
env: WP_TRAVISCI=travis:eslint
- php: 7.2
env: WP_TRAVISCI=travis:phpunit WP_VERSION=nightly
- php: 7.1
env: WP_TRAVISCI=travis:phpunit
- php: 7.0
env: WP_TRAVISCI=travis:phpunit
- php: 5.6
env: WP_TRAVISCI=travis:phpunit
- php: 5.5
env: WP_TRAVISCI=travis:phpunit
- php: 5.4
env: WP_TRAVISCI=travis:phpunit
fast_finish: true
cache:
apt: true
bundler: true
directories:
- vendor
- $HOME/.composer/cache
- node_modules
branches:
only:
- master
before_script:
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- |
if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then
composer global require "phpunit/phpunit=5.7.*"
else
composer global require "phpunit/phpunit=4.8.*"
fi
- |
composer global require phpmd/phpmd
composer global require wp-coding-standards/wpcs
phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs
composer install --no-interaction
- |
if [[ "$WP_TRAVISCI" == "travis:eslint" ]] ; then
npm install
node --version
npm --version
fi
script:
- |
if [[ "$WP_TRAVISCI" == "travis:phpvalidate" ]] ; then
phpmd classes text codesize,naming,unusedcode
phpcs .
fi
- |
if [[ "$WP_TRAVISCI" == "travis:codecoverage" ]] ; then
phpunit --coverage-clover build/logs/clover.xml
else
phpunit
fi
- |
if [[ "$WP_TRAVISCI" == "travis:eslint" ]] ; then
./node_modules/.bin/eslint .
fi
after_script:
# Push coverage off to Codecov
- |
if [[ "$WP_TRAVISCI" == "travis:codecoverage" ]] ; then
bash <(curl -s https://codecov.io/bash)
fi
notifications:
slack:
rooms:
secure: dVNKRk+6ptcuFn6SiT5SD0Rij5to3z3CETgNMAN1bdrczvYcMgyhZrW/51ihlGpMfdB45HuKI42tyLeNPOy6eMUg2weqonW5K+iVWw26toaVN5SV1hg7517A6f3GY5pLLCqV8uH5TKCvinGpPophf1upoHdTwnbAlQrlE2wPLg6oTsifqL73+mq5ieDizbu+1YJe6OHGhod7X64W8lB71QSN+6IXAbbqF1B7eCajzfa3BhAFRKSA7kCQwXuTNMCGhNPWeZBb8ljlcuTit9zFApmrDuI/JFK+ksDydhctygXrogZl8lj4Wg086vU4vphEPp+LJwU7T84J0shcxqVBI8/dW67ucZDP8Ghd5frj821EM41mnHz628nc1EFgIxgIdDr4bTQVh++bE5rnRMsi814p5tqu9gD1agbeXaQoZvqKofjamgLjV0JgEdsjl8L2+sKkgnq5KtZ0pZ919+G0xuUPlcAiuCa4SVLMJS64nxAYKEPIvlc1MU5Ue2yPCQBYD1hD552L0AyimEw9QExB3tBJm2XhwC6WHCi6m+T9E6+8n46a/he0HVAh89gLUpm3RHQc5i2THO7QLjIia4qG1pN4pQ7b+4lwCfuYzoSrDwxJ2BO8ha0tzLmcUl7EntxahmELQc48E/fxWgg374vOBTdqWVSrod4YvEdrcr1YKyQ=
on_start: never
on_failure: always
on_success: change